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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-17-2012, 09:46 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
EPUB with images. Tweaking inside to make it lighter.

The source odt file coming from outside has been converted with writer2xhtml: the end result is a nice but heavy EPUB file. 25 images. 2.8 megs.

Unzipping and looking the Images folder of the EPUB, I realized that using the mogrify -resize 50% command on the heaviest 10 images (which are not even fullscreen) I could save 1.2meg which would be enough.

This is very easy to do, either on the odt or on the EPUB. The first has a Pictures folder, the second an Images folder.

However, when I zip back the files, and I try to open the odt file or the EPUB file, it triggers a general error. Is there a way to do this cleanly, I mean in such a way that I could be able to open again the EPUB? (or the odt file)? Or is this behaviour forever forbidden?

Last edited by roger64; 08-17-2012 at 09:49 AM.
roger64 is offline   Reply With Quote
Old 08-17-2012, 10:41 AM   #2
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
With thanks to JS Wolf:
When you extract the files from the ePub, do not extract META-INF and metadata. Leave those alone. Then when you put back the rest of the files, the ePub will be compressed correctly (if it was correct before you extracted any of the contents).

From another source:

Create a new, empty folder with the title of your book as its name, no spaces, all lowercase is best.
Zip the empty folder. You now have an empty zip folder.
Now you’ll put the pieces of the epub into it, in the right order:
First, drag and drop the mimetype file into the zip folder.
Next, add the META-INF and the OEBPS folders (you can drag both into the folder at once, their order doesn’t matter, as long as the mimetype file is first).
Finally, change the .zip extension on your compressed folder to .epub.

So order and compression matter.

You could use Sigil, import the new ones with their new names, change the links, then delete the big ones then save. 2.8 meg isn't really so big for a book. If the epub is displayed on something with a bigger screen, the images might look better, though managing it so they don't overrun your Sony and still look good on a bigger screen can take some doing.
mrmikel is offline   Reply With Quote
Advert
Old 08-17-2012, 11:53 AM   #3
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
@mrmikel
I failed with both methods once. Then had success with the second one (new empty folder...) proceeding more slowly. Solved.

Thanks very much for your detailed reply.
roger64 is offline   Reply With Quote
Old 08-17-2012, 01:57 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,654
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The real question is now that the images are compressed a LOT more, how do they compare? Do you see compression artifacts? Are they not as clear?
JSWolf is offline   Reply With Quote
Old 08-17-2012, 02:21 PM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Out of 25 images, I selected the 10 heaviest who were not even fullscreen. Their total weight went from 1,6M to 437k.

I really cannot see any difference in display on IPAD size screen.

This procedure is very handy to know.
roger64 is offline   Reply With Quote
Advert
Old 08-17-2012, 03:30 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,654
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Don't use the term weight. That's nothing to do with what you are doing. You are changing the compression and the filesize.

Can you post a couple of images before and after so we can see if we can see anything. Sometimes it's hard to see things in detail underneath the fog of fingerprints on an iPad.
JSWolf is offline   Reply With Quote
Old 08-18-2012, 05:08 AM   #7
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by JSWolf View Post
Don't use the term weight. That's nothing to do with what you are doing. You are changing the compression and the filesize.
I suspected I could be wrong about using the word "weight" until I found new evidence. Here is a snapshot of the image folder where images are ranked by size. And, lo! the images lying at the bottom of the folder are the heaviest...

Images are copy protected and the best I can do is to send thumbnails. Hope this is OK. Sorry for that.
Attached Thumbnails
Click image for larger version

Name:	classement par taille.png
Views:	237
Size:	198.7 KB
ID:	90953  
roger64 is offline   Reply With Quote
Old 08-18-2012, 06:41 AM   #8
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Heavy, dude! (grin) Unless you know you are just creating material for an ipad pretty much for your own use, it is worthwhile to check on another device or viewer, like even ibook. The images could be a lot less satisfactory on such a larger device. That is why I leave color if present from the originals, though my little Sony won't display it.

Wolfie's concern, in addition to the proprieties, which should be observed at all times, is that weight is something which is generally used with fonts. To describe images as heavy might imply darkness or saturation of colors when applied to images to some people's minds.
mrmikel is offline   Reply With Quote
Old 08-18-2012, 09:43 AM   #9
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by mrmikel View Post

Wolfie's concern, in addition to the proprieties, which should be observed at all times, is that weight is something which is generally used with fonts. To describe images as heavy might imply darkness or saturation of colors when applied to images to some people's minds.
Consider it was a hazardous metaphor. When you say about somebody: his words carry no weight, you don't really mean kilograms either.

You are both technically right on it, of course and I never do it again. I shall pay due respect to the right of propriety. Thank you very much.
roger64 is offline   Reply With Quote
Old 08-18-2012, 10:15 AM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by roger64 View Post
You are both technically right on it, of course and I never do it again. I shall pay due respect to the right of propriety.
I'd wait until there's evidence of confusion before changing your "argot." I have a hard time imagining anyone (anyone capable of helping/contributing to the thread, that is) who wouldn't be easily capable of determining what you meant by "weight." No need to cater to pedantry on every occasion.
DiapDealer is offline   Reply With Quote
Old 08-18-2012, 11:26 AM   #11
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by DiapDealer View Post
I'd wait until there's evidence of confusion before changing your "argot." I have a hard time imagining anyone (anyone capable of helping/contributing to the thread, that is) who wouldn't be easily capable of determining what you meant by "weight." No need to cater to pedantry on every occasion.
True, but its still a poor word choice for use on a forum such as MR where many users use the Search function to find threads that may help them with their own issues. When a non-standard term is used it's not likely that that same non-standard term will be included in part of the search criteria.

Using non-standard terms hinders other users from finding the information later and is effectively anti-social. Helpful members that reply to such initial posts should provide the proper "translation" as part of their response (e.g. "By 'weight' I presume you mean 'file size' ", ...) so that there is some hope that a later Search will find the post.
dwig is offline   Reply With Quote
Old 08-19-2012, 05:04 AM   #12
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

Quote:
Originally Posted by JSWolf View Post

Can you post a couple of images before and after so we can see if we can see anything. Sometimes it's hard to see things in detail underneath the fog of fingerprints on an iPad.
In a previous post, I have used a manual solution, first ranking images according to their size and then reducing the ones which have the biggest size.

Here is an automatic solution which may be more convenient. I join some test images as asked to allow you to check if the images are fit for an EPUB display.

This mini-script makes use of Image Magick. Put the files to modify in one folder on your path. It will create a folder, named nouveau, and inside, it will insert files whose size have been reduced so as not to overcome 600 pixels in width or 800 pixels in height. All the files inside the test folder have the .jpg extension. Of course, you can change all these values above according to your needs.

Don't forget to press Enter in the terminal.

The joint folder essai contains 12 images (8,5 megs).
The folder nouveau contains the same 12 images but with a reduced size (1.14 meg).

Code:
mkdir nouveau
for FILE in *.jpg
do
 convert "$FILE" -resize 600x800\> nouveau/"$FILE"
done
Hope this could be of interest.
Attached Files
File Type: zip essai.zip (8.54 MB, 180 views)
File Type: zip nouveau.zip (1.14 MB, 204 views)

Last edited by roger64; 08-19-2012 at 05:32 AM.
roger64 is offline   Reply With Quote
Old 08-19-2012, 07:29 AM   #13
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
There is a free program, among others, called irfanview. One of its several functions is bulk actions on graphics files, such as resizing. This is additional option for Windows users needing to resize many files as well. As Wolfie noted, you have to be careful not to create a lot of jagged blurry pictures through too much conversion.
mrmikel is offline   Reply With Quote
Old 08-19-2012, 08:21 AM   #14
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by mrmikel View Post
.../... As Wolfie noted, you have to be careful not to create a lot of jagged blurry pictures through too much conversion.
Nobody can disagree with this. There is a limit for everything including downsizing. "Wolfie" wished also to check by himself. He now can judge and I certainly will appreciate his advice as well as yours.

Note: I am a Linux user and Irfanview 4.33 (latest) does not run with Wine (some former versions did). Edit: Portable version is working.


There is also to do this (among many other things) another fine GUI program running on all platforms: xnconvert

Last edited by roger64; 08-19-2012 at 10:38 AM.
roger64 is offline   Reply With Quote
Old 08-19-2012, 07:53 PM   #15
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Thanks for the pointer to this program and its brother xnview. They both look capable and useful.
mrmikel 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
Cover & inside images in epub on different readers JoanneM ePub 21 07-03-2012 08:39 PM
How to make TextView inside ViewPager scroll vertically polygrimm Android Developer's Corner 0 07-03-2012 07:59 AM
Rebuild ePub after tweaking hollowayhouse Conversion 8 08-05-2011 08:09 PM
"Conversion of WMF images is not supported" message inside converted book FF2 Conversion 8 04-11-2011 11:08 AM
Can you make a folder inside a Collection on Kindle? davtay Amazon Kindle 20 01-14-2011 10:52 PM


All times are GMT -4. The time now is 03:49 PM.


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