View Single Post
Old 06-28-2013, 09:48 AM   #21
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,826
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by HC9 View Post
@PatNY
I tried to resize image with fotosizer inside a zip file seen as a folder by Windows.

@BetterRed
I tryed to directly zip the folder but the epub created was not correct (cover page was ko). I understood I have to create first a zip file with the mime element and after to add items of the ebook.
[/I]
Aaaah, I think I know where you may have gone wrong. When you unzip the epub make sure that you extract it to a folder of the same name so that everything stays in its rightful place.

Lets say your epub file is MyBook.epub
Copy MyBook.epub to MyBook.zip
Rename MyBook.epub to MyBook_Original.epub
Unzip MyBook.zip to a folder named MyBook

The MyBook folder will have a file called mimetype that should contain the string application/epub+zip, otherwise I don't think its started out as an epub file.

Within the MyBook folder you must not
  • delete any files,
  • add any files,
  • change any file or subfolder names
  • move files around,
  • change any text files (html, css, opf, ncx etc)
You should only resize the big image files and save them with exactly the same names in exactly the same places as you find them in the unzipped folder.

Watch out for things like .jpg files being saved as .jpeg or vice versa, also watch out for case changes - eg image.jpg becoming IMAGE.JPG, not sure case matters in this context - but its prudent to assume that it does.

Then zip the MyBook folder and rename it to epub - the original mimetype file will still be there.

You should end up with

file MyBook_Original.epub
file MyBook.zip
folder MyBook
file MyBook.epub

BR

PS : Re your communications with Kovid - If a "Shrink Images" feature was to be implemented I think its more likely to be done as an optional plugin, rather than within the core Calbre product - like Modify, Generate cover etc.

There's a sticky topic for Plugin Suggestions in the Plugins Subforum, you could pop something in there.

BR

Last edited by BetterRed; 06-28-2013 at 10:02 AM. Reason: typo
BetterRed is offline   Reply With Quote