MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Conversion (https://www.mobileread.com/forums/forumdisplay.php?f=235)
-   -   Compress images (https://www.mobileread.com/forums/showthread.php?t=340022)

endemion06463 06-14-2021 05:50 PM

Compress images
 
The Calibre editor has this handy feature to "compress images losslessly" and it's especially great that there is an option to not compress is losslessly. I like light novels but lately they have been getting out of hand with their image sizes sometimes my ereader even has trouble loading them. I mean a light novel usually has 40k-50k words (aprox 200 pages). They really don't need to be over 40MB just because some (usually less than 20) drawings are saved as if they are high quality photo's. Jpeg's saved at best quality but drawings don't need that, you can hardly tell the difference between max quality and 25%

Is there a way to apply this feature to a batch of epub files?

If not where can I put a feature request?

If this feature was available in the batch convert panel you could do epub to epub and then enable image compression.

Personally I would like it the most if I could select a folder where the program then scans for all epub files including the sub-folders, then lists them and the available compression settings with an apply button :thumbsup: to start the proces.

theducks 06-14-2021 10:47 PM

Bulk mode Metadata Edit. The setting is near the bottom.
Also: If you set your profile for your device, the resizes the COPY SENT only.
(output profile is mostly about images)

kovidgoyal 06-14-2021 11:36 PM

The Polish books tool will doit for you in bulk. Preferences->Toolbars and add the tool to you r main toolbar. Notethat it only does lossless, not lossy compression.

endemion06463 06-16-2021 01:49 PM

Quote:

Originally Posted by theducks (Post 4130360)
Bulk mode Metadata Edit. The setting is near the bottom.
Also: If you set your profile for your device, the resizes the COPY SENT only.
(output profile is mostly about images)

That only seems to work for the cover image.

Quote:

Originally Posted by kovidgoyal (Post 4130371)
The Polish books tool will doit for you in bulk. Preferences->Toolbars and add the tool to you r main toolbar. Notethat it only does lossless, not lossy compression.

That it only allows lossless compression defeats the point. I only got like a ±3% reduction. So I guess we're back to feature requesting. Thanks anyway.

TranHoang 09-03-2021 06:36 AM

Quote:

Originally Posted by endemion06463 (Post 4130794)
That only seems to work for the cover image.


That it only allows lossless compression defeats the point. I only got like a ±3% reduction. So I guess we're back to feature requesting. Thanks anyway.

I ran into this issue today and I found out that you can set conversion profile to your device, then re-convert your library (EPUB to EPUB in my case). Calibre will reduce the size of images for you.

endemion06463 09-16-2021 10:53 AM

Quote:

Originally Posted by TranHoang (Post 4151348)
I ran into this issue today and I found out that you can set conversion profile to your device, then re-convert your library (EPUB to EPUB in my case). Calibre will reduce the size of images for you.

Doesn't work. Well maybe it does as in reducing the resolution of the images but it does nothing for the file sizes.

We really need bulk image compression in the book editor instead of workarounds that sort of do something similar.

theducks 09-16-2021 12:49 PM

If you have PREVIOUSLY converted that title: Preferences does not affect THOSE books as calibre remembers the PER BOOK usage so as to allow fine tuning.

The DIALOG AT THE START OF EACH CONVERSION shows the previous settings and allows those to be updated. (there is also a tick box in the bulk mode or button in single mod that clears previous settings and pulls the current preferences)

endemion06463 09-18-2021 03:22 PM

Quote:

Originally Posted by theducks (Post 4154717)
If you have PREVIOUSLY converted that title: Preferences does not affect THOSE books as calibre remembers the PER BOOK usage so as to allow fine tuning.

The DIALOG AT THE START OF EACH CONVERSION shows the previous settings and allows those to be updated. (there is also a tick box in the bulk mode or button in single mod that clears previous settings and pulls the current preferences)

Sorry I was wrong things are happening but it's hidden. The books shown in Calibre keep showing the original file size after conversion (it keeps an original version or something?). It's confusing. How do I replace my epub files with the converted version? Anyone care to write a step by step instruction set?

By the way unrelated to above, I've noticed that it's supprisingly hard to find modern fonts that properly differentiate between capital I and lower case l. If you happen te know a good font or two that does it properly let me know.

endemion06463 09-25-2021 12:24 PM

So I let calibre scan my light novel folder. It adds the books to calibre. Well actually it's copying them into calibre's library aka calibre's program folder. Which messes up the filename by the way. And takes forever...

There are 917 books in the library afterwards. There is a file number discrepancy there, as there are 937 files (±12GB) all .epub and a few .txt. So what's happening there?

So now I go ahead and convert them from epub to epub in bulk. Then it starts queuing, which also is slow. But worst yet at 67% it claims "device has no more room". So first I thought I ran out of disk space. So I moved calibre (portable) to a larger partition (with at least a few hundred GB's free). Well that turned out to be unnecessary as the same thing happened again. Seems like it can only que a limited number of books. Kinda weird for a bulk feature. So now I'm doing it in steps. First I tried 444 well didn't work same error. Then I tries 100, that worked, then I tried 200, also worked. Now I'm trying 300.

So lets say, after finishing all that. Then what? How do I get those converted files back to where they originally came from!?

kovidgoyal 09-25-2021 12:33 PM

You probably have your tempdir in ram, move it out or set CALIBRE_TEMP_DIR somewhere else.

endemion06463 09-25-2021 06:14 PM

Quote:

Originally Posted by kovidgoyal (Post 4157494)
You probably have your tempdir in ram, move it out or set CALIBRE_TEMP_DIR somewhere else.

I have no idea how to do that.

After spending hours copy pasting all those "converted" files back in their original folders and removing the old ones. Save to disk: Save only EPUB to disk in a single folder. It doesn't do what it says as it results in 3 file's per book to appear in that folder (cover.jpg, metadata.opf and the actual .epub file). Well it was rather challenging as the filenames aren't preserved trough this method. So that's rather messy now. Also some files got messes up I haven't checked all of them of course but what I did see was that some got extra pages inserted one even had all the images cut into horizontal section.

I also did some testing convert vs the editor's image compression. Well even though the convert method reduced 12GB to 1.8GB, the image compression method is even more efficient at least for the files that I tested, there was at least an extra 40% reduction and no messed up file names (and no other mess ups).

So PLEASE add bulk functionality to the editor's image compression function.


All times are GMT -4. The time now is 05:37 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.