Closed AlanRace closed 1 year ago
Hopefully this should now resolve the previous ambiguity.
I decided that the presence of app segments should set color_transform
rather than overwriting fallback_color_transform
, but that's a simple change if you prefer it the other way.
As this pull request is dealing with colour transforms, I had a look at solving https://github.com/image-rs/jpeg-decoder/issues/249 too. I have rewritten the logic for selecting the colour transform based on the information here.
That (hopefully) removes the need for the fallback transform being set, so I have removed it. Let me know what you think.
Added the ability to set the colour transform applied (resolves https://github.com/image-rs/jpeg-decoder/issues/238).
To do this, I had added a new
enum
which captures the possible options, including aDefault
option which retains the previous behaviour when thecolor_transform == None
.