Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-22-2011, 04:33 PM   #1
SamL
I mess around with Epubs
SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.
 
Posts: 82
Karma: 1566
Join Date: Mar 2011
Location: Cambridge, MA
Device: mac, ipad, nook, kindle
Linking large JPGs in an Epub

For refrence, I am doing this on an iPad.

In my epub I have a display image in the text. I would like the user to be able to click on it, and have it display larger, that you could zoom a little in to. To do this I am using this code:

Quote:
<a href="images/PictureLarge.jpg" ><img src="images/PictureSmall"/></a>
So the smaller picture (about 600px wide) will display on the page. Even thought its the smaller of the two it still takes up almost the entire page.

When you click the image on the page, the larger image (2000px wide) opens up.

The problem I am having is that my image is wider then it is tall (landscape.) When the image opens it doesn't fit correctly to the screen, so you have to scroll left to right.

I've tried making the image a portrait size, with some white space underneath, but then it shrinks down to about 75% of the screen size. So I can zoom in to it like I want, but the width doesn't fill the screen (only about 3/4 of it.)

Is there something I can put in the code so the image will fit to the screen correctly? It is either too wide, or not wide enough. I really don't understand why it is doing this.

Any help is greatly appreciated.

Thanks
SamL is offline   Reply With Quote
Advert
Old 06-29-2011, 10:43 AM   #2
Tokage
Junior Member
Tokage will become famous soon enoughTokage will become famous soon enoughTokage will become famous soon enoughTokage will become famous soon enoughTokage will become famous soon enoughTokage will become famous soon enough
 
Posts: 2
Karma: 500
Join Date: Jun 2011
Device: iPad, Kindle
Hi,

Instead of linking directly to the large picture:
<a href="images/PictureLarge.jpg" ><img src="images/PictureSmall"/></a>

perhaps you could link another xhtml page containing the large image:

<a href="PictureLarge.xhtml"><img src="images/PictureSmall"/></a>

Then PictureLarge.xhtml would be something like:
..
<body>
<img src="images/PictureLarge.jpg" width="100%"/>
</body>
..
Tokage is offline   Reply With Quote
Old 06-29-2011, 04:27 PM   #3
SamL
I mess around with Epubs
SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.
 
Posts: 82
Karma: 1566
Join Date: Mar 2011
Location: Cambridge, MA
Device: mac, ipad, nook, kindle
Quote:
Originally Posted by Tokage View Post
Hi,

Instead of linking directly to the large picture:
<a href="images/PictureLarge.jpg" ><img src="images/PictureSmall"/></a>

perhaps you could link another xhtml page containing the large image:

<a href="PictureLarge.xhtml"><img src="images/PictureSmall"/></a>

Then PictureLarge.xhtml would be something like:
..
<body>
<img src="images/PictureLarge.jpg" width="100%"/>
</body>
..

That's actually a great idea. Is it possible to have xhtml files that are "hidden"? Is there some way I can not include them in the "spine" part of the opf, so they will only show up when I click the image link?
SamL is offline   Reply With Quote
Old 06-29-2011, 09:31 PM   #4
Tokage
Junior Member
Tokage will become famous soon enoughTokage will become famous soon enoughTokage will become famous soon enoughTokage will become famous soon enoughTokage will become famous soon enoughTokage will become famous soon enough
 
Posts: 2
Karma: 500
Join Date: Jun 2011
Device: iPad, Kindle
Hi, yes. In the spine, you use the "linear" attribute to indicate that. For example:

In the manifest:
<item id="LargePicture" href="LargePicture.xhtml" media-type="application/xhtml+xml"/>

Then in the spine:
<itemref idref="LargePicture" linear="no"/>
Tokage is offline   Reply With Quote
Old 06-30-2011, 03:24 PM   #5
SamL
I mess around with Epubs
SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.SamL once ate a cherry pie in a record 7 seconds.
 
Posts: 82
Karma: 1566
Join Date: Mar 2011
Location: Cambridge, MA
Device: mac, ipad, nook, kindle
Wow thank you so much! Just tried this and it worked perfectly!
SamL is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking MS-Word document in epub surendraps Writers' Corner 0 11-10-2010 03:42 AM
iBooks - ePub - Linking Bug lcoleman79 Apple Devices 2 06-30-2010 12:06 PM
Help - epub files too large for Stanza? Nonstickron Calibre 2 05-17-2010 11:47 PM
Don't see all pictures in large epub liryc13 Sigil 1 12-13-2009 05:03 PM
Linking ePub files to eachother netman49 ePub 2 09-19-2009 06:19 AM


All times are GMT -4. The time now is 11:46 PM.


MobileRead.com is a privately owned, operated and funded community.