Skip to content

Stop doing color conversion when decoding JPEG compressed images#274

Merged
fintelia merged 1 commit intoimage-rs:mainfrom
fintelia:jpeg-no-color-conversion
Jun 22, 2025
Merged

Stop doing color conversion when decoding JPEG compressed images#274
fintelia merged 1 commit intoimage-rs:mainfrom
fintelia:jpeg-no-color-conversion

Conversation

@fintelia
Copy link
Contributor

Based on my read of TIFF Technical Note #2, we shouldn't be doing color conversion at all.

One weird consequence of this is that if the JPEG data is CMYK but the TIFF header specifies the data is 4 samples per pixel with with a photometric interpretation RGB, then the four channels of JPEG data will be treated as RGBA.

Fixes #260

@fintelia fintelia force-pushed the jpeg-no-color-conversion branch from 64928fc to 6d30abb Compare June 22, 2025 17:38
@fintelia fintelia merged commit 7648317 into image-rs:main Jun 22, 2025
15 checks passed
@fintelia fintelia deleted the jpeg-no-color-conversion branch June 22, 2025 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot open JPEG encoded TIFF with alpha channel

1 participant