View Single Post
Old 09-26-2017, 11:46 PM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Image editing creates unmanifested images

Often I find an epub with a huge image, and want to trim it down.

I routinely use IrfanView to do this.

It's convenient to r-click on the image in Sigil, choose "Open with" and then I am working on the image in a temp directory which when I exit IrfanView replaces the original image.

However, one tool in Irfanview is "Jpeg lossless crop", which is self explanatory.

The usual way to use it is select an area of the image, choose the option and your cropped file replaces the original.
It normally makes a backup of the original file in with "_org" added to the name.

When I exit Irfanview it seems OK, the new image is in place. However, I noticed that the filesize had increased, not decreased, though the new image is smaller.

F7 says "No problems found". If I close and reopen the epub, no errors are reported.

Eventually I do an epubcheck:

Quote:
item 'OEBPS/Images/cover_org.jpg' exists in the EPUB but is not declared in the OPF manifest
And so I open the epub as a zip and see that I have both the new image cover.img and the backup of the old one: cover_org.jpg.

I can delete it from the zip and fix it, but aside from epubcheck, it's totally invisible in Sigil, not listed in the file tree.

Presumably, Irfanview renames the original file, makes the cropped one and names that as the original filename and Sigil is confused.

If you aren't suspicious you can end up with an epub bloated with hidden images.

Last edited by AlanHK; 09-27-2017 at 12:14 AM.
AlanHK is offline   Reply With Quote