Open akadoura-zyres opened 1 month ago
Hi, I investigated this and found, that it is likely an issue with handling a JPEG which uses the CMYK colorspace. This only applies to the plg_image_c
and is not present in plg_image_golang
.
A simple workaround is to use the latter.
Looking down further into the image_c
code, it seems the relevant part is the hardcoded colorspace property in server/plugin/plg_image_c/image_jpeg.c:101
jpeg_config_output.in_color_space = JCS_RGB;
Replacing this with
jpeg_config_output.in_color_space = jpeg_config_input.out_color_space;
which effectively uses the colorspace from the input image for the output image, should do the trick. Although, I did not test this thoroughly, with many different JPEGs, just my sample.
Checking the colorspace of the input image and the generated thumbnail:
$ magick identify -verbose image.jpg | grep Colorspace # original
Colorspace: CMYK
$ magick identify -verbose image_thumbnail.jpg | grep Colorspace # downloaded thumbnail
Colorspace: CMYK
I didn't create a pull request since it's just a one-line change, but I can definitely do it if you'd like.
Have a nice weekend, everyone ✌️
wow that's pretty cool, happy to accept a PR for this
PR created at https://github.com/mickael-kerjean/filestash/pull/723
I've noticed an issue where the thumbnail is not being displayed for some image files and couldn't figure out what the reason. Instead of showing the generated thumbnail, the default thumbnail image of
src="/assets/icons/placeholder.png"
is being used.Observation: These images contain some custom metadata (shown below), and the thumbnail shows again after the metadata removal.
Could you please investigate why this is happening?