View Full Version : Image sizing in ePub


JSWolf
01-15-2012, 07:41 PM
Is there a way in ePub to make it such that an image sizes up to the full size of the image but once it hits the full size, it stop sizing?

So if the screen was a resolution of 600x800 and the image was 500x900 that the image would be sized to fit the 800 lines but on a screen of 768x1024, it would display at 100% without going over.

theducks
01-15-2012, 10:57 PM
Is there a way in ePub to make it such that an image sizes up to the full size of the image but once it hits the full size, it stop sizing?

So if the screen was a resolution of 600x800 and the image was 500x900 that the image would be sized to fit the 800 lines but on a screen of 768x1024, it would display at 100% without going over.

In the CSS;
set Max-width and Max-height values for the block that contains the Image.
SVG has its own version.
My first rule is: Maintain aspect Ratio (I hate stretched images)

JSWolf
01-15-2012, 11:31 PM
Thank you.

JSWolf
01-15-2012, 11:33 PM
In the CSS;
set Max-width and Max-height values for the block that contains the Image.
SVG has its own version.
My first rule is: Maintain aspect Ratio (I hate stretched images)

Full screen covers that aren't full screen really bug me. 510x680 bugs me too. Thanks to MS Reader we have that off-aspect cover size sometimes.

Adjust
01-17-2012, 07:03 PM
I actually make the cover image 600x860px
And css it to 95%

I like having a nice white border around it.

I hate having a stretched image...

JSWolf
01-17-2012, 07:04 PM
I actually make the cover image 600x860px
And css it to 95%

I like having a nice white border around it.

I hate having a stretched image...

If it is a commercial eBook I'm adding in a cover for, I try to find a hi-res cover image and if I do and it's larger then 1024 lines, I reduce it to 1024 lines keeping the proper aspect ratio of course. Then I use that image for the cover.