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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-29-2009, 10:53 PM   #1
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,572
Karma: 3784089
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, Kobo Glo/AuraHD/Aura6"
Help with images in EPUB conversions, please

Please can anyone help me with an aggravation I'm having displaying some images in EPUB on my PRS-505?

The source ebook is HTML/CSS and each image (none are inline images) has HTML code something like :
<p class=aligncentre><img src="images/mypic.png"></p>

This works fine most of the time. However, if the image is too large to display on the PRS-505 then it doesn't display at all. So far I've solved the problem by manually looking for the big images and physically reducing the size before importing to Calibre.

I would like to know whether there is a generic way I can code the HTML and/or CSS such that:-
1. Images which are small enough display at their correct full size.

2. Images which are "too big" are automatically displayed at a reduced size which is guaranteed to display on the PRS-505.

3. Naturally I want the aspect ratio to be preserved in all cases.

4. I don't want to have to manually edit each individual <img> tag.

Any suggestions gratefully received.

Regards, Jackie

P.S. A conversion to LRF seems to scale the big images correctly without taking any special action.
jackie_w is offline   Reply With Quote
Old 10-30-2009, 10:42 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 24,816
Karma: 4369673
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
conversion to epub will also rescale images as long as you choose the correct output profile
kovidgoyal is online now   Reply With Quote
Old 10-30-2009, 11:46 AM   #3
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,572
Karma: 3784089
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, Kobo Glo/AuraHD/Aura6"
Hi Kovid,
My Output profile is set to "Sony Reader" and in case it's relevant so is my Input profile. Is this wrong for a Sony PRS505?

The particular image I had trouble with was sized 509 x 800. It displayed just fine in the ebook-viewer in both zip and EPUB format. But it was not visible in the EPUB once it was on the PRS505.

After I manually reduced it to 484 x 760 (i.e 95%) and reimported all was OK.
jackie_w is offline   Reply With Quote
Old 10-30-2009, 11:50 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 24,816
Karma: 4369673
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In the conversion log were there lines like

Rescaled image ...
kovidgoyal is online now   Reply With Quote
Old 10-30-2009, 11:58 AM   #5
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,572
Karma: 3784089
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, Kobo Glo/AuraHD/Aura6"
I'll need to reconstruct my test files first I'll report back soon.
jackie_w is offline   Reply With Quote
Old 10-30-2009, 12:03 PM   #6
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,572
Karma: 3784089
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by kovidgoyal View Post
In the conversion log were there lines like

Rescaled image ...
Yes (next to last line) here is the log:-

Convert book 1 of 1 (BigPicture)
Processing archive...
InputFormatPlugin: HTML Input running on c:\docume~1\jackies\locals~1\temp\calibre_0.6.19_q 6sngr_plumber\content.opf
Parsing all content...
Manifest item 'toc.ncx' not found
Parsing BigPicture.htm ...
Parsing jsebook.css ...
Generating default TOC from spine...
Merging user specified metadata...
Detecting structure...
Detected chapter: Big Picture
Detected chapter: Small Picture
Auto generated TOC with 2 entries.
Inserting metadata into book...
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...
Trimming unused files from manifest...
Parsing stylesheet.css ...
Creating EPUB Output...
Splitting on page-break
Splitting on page-break
Looking for large trees in BigPicture.htm...
No large trees found
Split into 2 parts
Looking for large trees in jacket.xhtml...
No large trees found
Removing anchor from TOC href: BigPicture_split_0.htm#calibre_toc_2
Removing anchor from TOC href: BigPicture_split_1.htm#calibre_toc_3
Rescaling image 8romgmx5wimoftbblc8zp3fikoi.png
EPUB output written to c:\docume~1\jackies\locals~1\temp\calibre_0.6.19_f 17vb1.epub
jackie_w is offline   Reply With Quote
Old 10-30-2009, 01:01 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 24,816
Karma: 4369673
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre resizes the image to fit inside a 600x775 area for the SONY reader output profile. unzip the epub and see if the image has been correctly rescaled.
kovidgoyal is online now   Reply With Quote
Old 10-30-2009, 01:27 PM   #8
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,572
Karma: 3784089
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, Kobo Glo/AuraHD/Aura6"
The "big image" (which was originally 509x800) has been rescaled to 493x775 inside the EPUB. When viewing the EPUB on the PRS505 there is just a 3centimetre-ish gap where the image should be.

Is is relevant that the image is a .png not a .jpg?
jackie_w is offline   Reply With Quote
Old 10-30-2009, 01:34 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 24,816
Karma: 4369673
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
try resizing the image to 493x774 or 773 and so on to find the largest size the 505 will consent to display the image at and I'll change the size accordingly in the profile for the enxt release. I don't hink it being a png should make any difference
kovidgoyal is online now   Reply With Quote
Old 10-30-2009, 02:00 PM   #10
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,572
Karma: 3784089
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, Kobo Glo/AuraHD/Aura6"
Hmm... curious.
I started the test by manually reducing the image to 493x775 (i.e calibre's chosen rescaled size) then re-importing. When this new file is converted to EPUB it displays OK on the PRS-505.

I checked the conversion log to confirm that there was no longer a "Rescaling image..." line in it.

I'm not sure where to go from here.
jackie_w is offline   Reply With Quote
Old 10-30-2009, 03:08 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 24,816
Karma: 4369673
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah this will be one of those ADE refuses to render an image that all other image viewers accept bug. Open a ticket and attach your file, I'll see if I can convince calibre to output an image that ADE can render, but I'm not hopeful.
kovidgoyal is online now   Reply With Quote
Old 10-30-2009, 03:29 PM   #12
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,572
Karma: 3784089
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, Kobo Glo/AuraHD/Aura6"
Kovid,
I've just finished doing a bit more testing. I think maybe the problem is with the png image file itself. In the absence of being able to think of anything else to do, I converted the file to jpg. I left it at its full size and re-imported to calibre. After conversion and sending to PRS-505. The image displays OK.

I'm sorry for any inconvenience. I don't think it's worth wasting anymore of your time. I'll open a ticket if I keep getting similar problems in the future.
jackie_w is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversions from RTF (to mobi/epub) Gwen Morse Calibre 6 10-14-2010 06:00 AM
Break tags don't work in epub conversions Amalthia Calibre 0 04-06-2010 01:07 PM
What is Order of Conversions To epub Vienna01 Calibre 3 03-26-2010 10:38 PM
Calibre PDF conversions - LRF/EPUB vs RTF jackie_w Calibre 14 09-22-2009 03:06 PM
Calibre ePub re-conversions... slantybard Calibre 1 07-14-2009 05:05 PM


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


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