New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting 1-bpp PNG into TIFF does not preserve depth #277
Comments
|
I also tried 6.9.5-10. The bug is there too. |
When saving an imported PDF 1-bpp images are corrupted <https://bugzilla.redhat.com/show_bug.cgi?id=1369984>. This due to bug in PDF::API2 <https://rt.cpan.org/Public/Bug/Display.html?id=118047> and a change in ImageMagick <ImageMagick/ImageMagick#277>. This patch makes sure the image depth is preserved at conversion to TIFF by Image::Magick. Otherwise 8-bpp TIFFs got broken by PDF::API2. Signed-off-by: Petr Písař <ppisar@redhat.com>
|
The PNG reader calls |
|
We call png_set_packing in the decoder to expand the samples to 8 bits, but we also call png_set_packing in the encoder to pack them into 8-sample bytes again. |
|
I don't see anything in the ChangeLog nor is there any difference between 6.9.2-6/coders/png.c and 6.9.3-1/coders/png.c that would explain this. |
|
I think the line https://github.com/ImageMagick/ImageMagick/blob/ImageMagick-6/coders/png.c#L2433 is setting the depth to 8 bit instead of 1 bit. |
|
I can see 6.9.9-38 is still broken. |
|
6.9.10-64 is also broken. |

After upgrading from 6.9.2-7 to 6.9.3-0 I found that conversion from PNG into TIFF stopped preserving image depth. The same issue is with latest 6.9.5-5:
The text was updated successfully, but these errors were encountered: