Would it be much work to make
compress_news_images work for PNG files too? One news site I use has some 3-10MB PNG images that would be nice to resize like is already possible for JPG files.
I see that
scale_image() in
src/calibre/utils/img.py looks like it can deal with PNG files, but
rescale_image() in
src/calibre/web/fetch/simple.py only tries to rescale JPEG/JPG files. It looks like we convert anything that isn't PNG/JPEG/JPEG to these formats, so could it be as simple as changing the rescale check from
Code:
if self.compress_news_images and itype in {'jpg','jpeg'}:
to
Code:
if self.compress_news_images:
?
(I know enough python to be dangerous, but probably not be useful!)