View Single Post
Old 03-24-2008, 08:08 PM   #4
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
auto-scale images : BUG and WORKAROUND

if you place an image in your book, which is larger than the maximum screen size of 310 x 430 px (for a 1150 .imp), eBook Publisher will automatically scale the image to fit the screen.

BUG : it will only scale horizontally, not vertically. this means, if your image is tall and narrow, it will fill the screen from side to side but the bottom will be cut off.

WORKAROUNDS : found after much discussion over here
1. resize your image to 430 px max height (for 1150). this is the cleanest solution, especially if you are *only* making an eb1150 version .imp file.

OR

2. add empty side margins to your file, so that it is PROPORTIONAL (homothetic) to the max 1150 screen size of 310 x 430. this can easily be done in Photoshop or other image-editing software, including with batch treatment. THE KEY IS TO RESPECT THE HEIGHT:WIDTH RATIO ; size is immaterial. see practical method below.

NOTE : this workaround will allow you to use the same set of images for the creation of an eb1150 AND 1200 version .imp file, provided that in the 1200 version you add 2ems of margin to the left and right of each full-screen image.

PHOTOSHOP WORKFLOW FOR THIS METHOD :
1. open the image you want to resize (img1).

2. create a "dummy" image* (File>newfile) of 310 x 430 px.

3. select img1, and open the image size dialogue box (ctrl + alt + i). copy the current HEIGHT (ex : 800px), cancel.

4. select dummy image* : open image size, verify that the dimensions are linked ("scale proportionately"), paste the height of other image (800px). The dummy image will automatically be resized. Copy the resulting adjusted WIDTH (for 800px height, width will be 577px), cancel.

*The dummy image is only to simplify things by letting Photoshop do all the math. if you like calculating things, by all means skip the dummy image and figure it out yourself.

5. back to img1, canvas size (ctrl + alt + c), verify that the canvas will be enlarged from the center out and fill color is white, paste new WIDTH (577px), OK.

You can also make a photoshop script for automating this process, if you have a lot of images which are all close to the same height (best results if images have less than 20% variation in height). If height varies wildly, FIRST average out heights by reducing the images (constrain proportions) to the same height.

If you are making an imp 1200 version as well, add 2 em margins to the left and right of each image. you can easily do this by editing the html code of your 1200 version and doing a search and replace (ctrl + H) :
for example, search ><img (the end of the opening p or div container tag, the beginning of the opening img tag)
replace with style="margin-left:2em; margin-right:2em"><img

i recommend doing all the code cleanup on the 1150 version *first* ; then save the html / opf, make the book, close. then MAKE A COPY of the html file adding "_1200" to the filename. then you import this file into the _1200 opf which mobi2imp has conveniently created for you, instead of the original html, and add all the margins to the images. this way, you have 2 separate files to address the different format, but you only do the work once.
zelda_pinwheel is offline   Reply With Quote