![]() |
#1 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
![]()
Having following problem:
When converting to EPUB, picture size very often don't suit to screen size of my PRS350. Pictures, even those smaller 600x800 are only partly visible on screen. The reader scales them very lage. Epubs are converted with CALIBRE from HTML. HTML is created with Adobe PDF converter. I tried to fix that with CSS on the reader (possible with PRS+) using something like that: img { max-hight: 780px !important max-width: 590px !important } That does "something": pictures are sometimes 780*590 large and partly distorted, sometimes unaltered (like without CSS intervention) and out of range (only partly visible on screen). ![]() All I want are pictures visible totally and without distortion. With PRS+ in combination with CSS on my reader. Any suggestions? Thank You A. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
Try:
.img { height: 100%; max-width: 100% } Alternatively you can use SVG: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 [original width] [original height]" width="100%"> <image height="[original height]" width="[original width]" xlink:href="[imagefile]"></image> </svg> |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Thank you - will try that!
Question: "100%": does that statement refer to the px of the picture or the px of the reader? If it refers on the px of the picture - what does that do with pictures >600x800px? A. |
![]() |
![]() |
![]() |
#4 |
Nameless Being
|
It might be that your images are not in a 3/4 ratio in their original formats. (When you reduce 600px X 800px too the lowest whole number it equals an aspect ratio of 3 to 4.) For example, if you have an image that is 600px X 700px and you tell the reader to change it to 590px X 780px or to 100% X 100%, the result will be that the image is distorted along the long axis. I would try to maintain the original proportions (aspect ratio) of the images to prevent distortion.
Another problem occurs if an image is considerably smaller than the 600px X 800px screen and then enlarged to fit it. In this case you can get a lot of pixelization--fuzziness. For example, if you enlarge a 300px X 400px image to 600px X 800px, it might look fuzzy, especially if the image contains lines or text. Quite often publishers use the smallest sized images they can to keep the ePub file size from getting too large. If those images are too small, there isn't much you can do to make them display well at fullscreen size. Last edited by jswinden; 06-28-2011 at 01:22 PM. |
![]() |
![]() |
#5 | |
Nameless Being
|
Quote:
BTW, there is no such thing as "px of the picture" or the "px of the reader." Images and screens have height and width sizes. Image height and width sizes can be set two different ways--you can either set the number of pixels using px, or the percentage of display area by using %. Last edited by jswinden; 06-28-2011 at 01:33 PM. |
|
![]() |
Advert | |
|
![]() |
#6 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Thanks for comments!
I made some further investigations: Problem seems to be that the SONY Reader ignores some CSS comments in the EPUB file! It doesn't scale down images. If a picture (JPG) in the EPUB is in its original size 1305px & 1331px CALIBRE overrides it in CSS with: height: 520.627px; width: 531px; So far so good. But on the reader the picture is displayed in its original size (or at least try to do that) --> picture is too large --> picture is just partly visible. So scaling on the PRS350 doesn't work properly. The solution could be to scale down the pictures physically. With sometimes tons of pictures in a large book that's too much work. A. |
![]() |
![]() |
![]() |
#7 |
Nameless Being
|
That might be a calibre conversion error. Can you show the CSS and/or HTML calibre creates? I never seem to have problems with images on my 350, so I think the 350 scales properly.
|
![]() |
![]() |
#8 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
CSS attached. Your suspicion could be right. When I delete the css from the EPUB pictures show the right way.
So maybe there's to find a quick prozedure to remove the image scaling comments from the css file. Any suggestion? Removing by hand should be the last option because I've tons of books to convert and calibre always made this kind of css. stylesheet.txt |
![]() |
![]() |
![]() |
#9 |
Nameless Being
|
I assume this is one of the CSS styles calibre was using with an image:
Code:
.calibre10 { height: 1099px; width: 1332px } One thing you might want to check out is the freeware called Sigil. Just google it. Sigil lets you directly edit an ePub without adding a bunch of CSS gibberish to it like calibre does. |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,246
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
As far as I'm aware, using Calibre to create your EPUB should automatically sort out any necessary image scaling so nothing runs off the screen. You shouldn't need to edit anything manually.
If the images are inside the book (i.e. not the cover) make sure that Convert - PageSetup - Output file is set to one of the Sony options. I use 'Sony Reader' for both my 6" PRS650 and 5" PocketBook 360. I think it uses something like 590x775 as the absolute max size, but it will reduce that accordingly, depending on the PageSetup margins you've set. It's always worked for me. If it's the cover you're having problems with check out the cover options on the Convert - EPUB Output page. The above options are per-book. If you want to set them as standard defaults for all books you can choose the same options in Preferences - Common Options - PageSetup and Preferences - Output Options - EPUB Output |
![]() |
![]() |
![]() |
#11 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Maybe that's the reason for the picture problems with CALIBRE and the ereader:
In the source HTML files every picture has a scaling like this: <img src="picture1.jpg" alt="" style=" width:287.76pt; height:291.12pt;"/> Calibre doesn't remove this scaling (tried a couple of options on ... EPUB Output). Cover never made problems. Reason I guess is that the cover is added later from calibre from meta data without the scaling statement. So there is to find a quick prozedure to remove ALL image scaling statements in CSS without doing it by hand (which works fine). ALL images in CSS have a statement like this above mentioned: .calibre10 { height: 1099px; width: 1332px } Simple search and replace of course doesn't work... A. |
![]() |
![]() |
![]() |
#12 |
Nameless Being
|
I see a problem with using pt (points) rather than px (pixels) in HTML. Points are common size values in the print industry and are supposed to translate into 72 points per 1 inch. Pixels became popular in HTML, but the problem with pixels is that virtually every device and/or monitor uses a different number of pixels per inch, so you never know what X-number of pixels will look like when displayed on different devices. Percentage (%) or em are relative-based values and are more usable for multiple devices and HTML in general. With percentage you set the percent of the screen on which to display some object. With em you set everything in relation to 1em, so 0.5em equals half of 1em and 2em equals twice the size of 1em, etc. That is usually more appropriate for text setting than images though. Enough of that, now on to the CSS and HTML...
Code:
<img src="picture1.jpg" alt="" style=" width:287.76pt; height:291.12pt;"/> I see no CSS class call in the img tag, so I'm guessing it is applied to the tag that includes the img tag (surrounds it in other words). If so, then class calibre10 should cause the image sizes to be height=1099px and width=1332px. I would try changing class calibre10 to something like: Code:
.calibre10 { height: 550px; width: 666px } If you wanted to set the image size by HTML alone, you could write it as: Code:
<img src="picture1.jpg" width="550" height="666" /> In summation, it looks like the HTML code in img tags as far as height and width is being ignored because it is syntactically incorrect, so it is probably easiest to just edit the CSS to use height and width that are nearer to the screen size. |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,246
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
...or remove the style width and height completely from the html:
Code:
<img src="picture1.jpg" /> I think, strictly speaking, <img> tags are supposed to be within <p> or <div> tags and have an alt attribute like this: Code:
<p><img src="picture1.jpg" alt="pic" /></p> |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Problem reading converted EPUB & PDB on Barnes & Noble eReader | webfolk | Calibre | 3 | 01-09-2012 10:08 PM |
prs 505 vs prs 350 & 950 | makani | Sony Reader | 2 | 04-08-2011 01:28 AM |
Classic Why B&N ePub File Size So Huge? | Lilly | Barnes & Noble NOOK | 4 | 01-02-2010 05:59 AM |
PRS Fonts, PDF gray && Calibre | Hranostak | Sony Reader | 1 | 11-22-2008 02:50 PM |
picture not showing & font size too amall | salempeacock | IMP | 2 | 12-28-2007 02:11 AM |