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

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 08-06-2019, 03:55 PM   #1
xdgc
Junior Member
xdgc began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2019
Device: none
[ENHANCEMENT] Reducing book size through image scaling

Space is at premium on my 4GB Paperwhite. A number of my books have glorious big full color photos that I can't make use of on a 1448x1072 B&W screen, so I wrote a program to resample these to fit on screen in grayscale. I save as much as 80%-85% of book size this way.

I wanted to integrate this into Calibre. At first I tried making a separate plugin, but in the end I felt it fit much better as an addition to Polish. I have a patch that implements this "kindlify" mode as an alternative to Polish's stock image recompression.

What is the correct procedure to submit this for review upstream? The various web pages and posts here are unclear on the subject of how to submit ready-for-review updates to core Calibre, and the launchpad tracker doesn't seem like the right place to send git branches. Github PR?
xdgc is offline   Reply With Quote
Old 08-06-2019, 08:48 PM   #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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
github PR is fine, however, Polish is supposed to only have non-destructive tools. A separate grayscaling/downsampling tool would be better.
kovidgoyal is offline   Reply With Quote
Old 08-06-2019, 09:23 PM   #3
xdgc
Junior Member
xdgc began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2019
Device: none
Thanks. I guess I see this as little different from the existing image recompression. I do not want to destroy the original, which is why I leaned toward Polish: it keeps the ORIGINAL_FOO format. Creating another plugin that creates ORIGINAL_ formats seems redundant.

But let's say I redo it as a standalone plugin. What's your advice on naming my original so that it does not conflict with Polish?
xdgc is offline   Reply With Quote
Old 08-06-2019, 10:21 PM   #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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Feel free to name it ORIGINAL_ that is used by many things in calibre, including the conversion system.
kovidgoyal is offline   Reply With Quote
Old 08-06-2019, 10:42 PM   #5
xdgc
Junior Member
xdgc began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2019
Device: none
Alright. I don't know whether I will get around to this (plugin architecture super confuses me) but I appreciate the guidance.
xdgc is offline   Reply With Quote
Old 08-06-2019, 11:46 PM   #6
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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Feel free to ask if you need guidance, lots of plugin developers hang out here.
kovidgoyal is offline   Reply With Quote
Reply

Tags
patch, polish

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shrinking pdf in calibre / different folders reducing size godlich PDF 5 08-27-2014 02:31 AM
Tutorial on reducing font size on a per book basis howyoudoin Amazon Kindle 0 11-09-2013 06:47 AM
Reducing file size for straight-text epub? Christi H ePub 5 01-10-2013 10:09 PM
Reducing the size of epub files? Corpsegoddess ePub 8 01-09-2013 08:14 PM
Calibre reducing image sizes? HarryT Conversion 2 04-21-2011 08:18 AM


All times are GMT -4. The time now is 01:10 AM.


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