dbrgn / miniaturo

A drop-in replacement for raw-thumbnailer.
GNU General Public License v3.0
8 stars 1 forks source link

Output formats #4

Open dbrgn opened 3 years ago

dbrgn commented 3 years ago

Should output image formats other than PNG be supported?

dbrgn commented 3 years ago

And if yes, how?

I'm not sure what's best, but tend towards the first variant, even if it's not 100% compatible in edge cases (e.g. someone exporting to thumb.jpg and expecting it to be in PNG format anyways).

dbrgn commented 3 years ago

@hfiguiere what's your opinion on this?

hfiguiere commented 3 years ago

This depend of the thumbnail API but if it allows it I would output JPEG for case with the thumbnail is JPEG (no rencoding - save the bitstream directly) and PNG in the other cases.

But reading the Nautilus documentation, I don't think this is allowed.

dbrgn commented 3 years ago

Yeah, I would not change the behavior for the current default case. I think the caller of the API should be able to decide how to generate the thumbnails, either through the output filename or through a separate parameter.

hfiguiere commented 10 months ago

With PR#15 it will either output a JPEG or a PNG. The latter if the thumbnail is a pixmap, the former if it is already a JPEG. The libopenraw API doesn't have any other option.