Bug 1378891 - TIFF output does not preserve input depth
Summary: TIFF output does not preserve input depth
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ImageMagick
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Alexeev
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/ImageMagick/ImageM...
Whiteboard:
Depends On:
Blocks: 1369984
TreeView+ depends on / blocked
 
Reported: 2016-09-23 13:13 UTC by Petr Pisar
Modified: 2023-02-27 11:11 UTC (History)
4 users (show)

Fixed In Version: ImageMagick-6.9.12.61-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-27 11:11:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
1-bpp PNG input image (313 bytes, image/png)
2018-05-03 13:45 UTC, Petr Pisar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github ImageMagick ImageMagick6 issues 188 0 None open TIFF output does not preserve input depth 2022-07-03 21:26:52 UTC
Github ImageMagick ImageMagick6 issues 57 0 None closed Converting 1-bpp PNG into TIFF does not preserve depth 2020-05-01 08:25:50 UTC

Description Petr Pisar 2016-09-23 13:13:28 UTC
This Perl code loads an image from "in.png" and stores it into "out.tiff":

#!/usr/bin/perl
use strict;
use warnings;
use Image::Magick;

my $image = Image::Magick->new;
$image->Read('in.png');
$image->Write(filename => 'out.tiff');

Normally, it should preserve image depth, but this is not true with ImageMagick-perl-6.9.3.0-2.fc24.x86_64. If I put and 1-bpp PNG image to the input, the output TIFF image has 8 bpp:

$ ./reproducerim 
$ file in.png out.tiff 
in.png:   PNG image data, 157 x 196, 1-bit grayscale, non-interlaced
out.tiff: TIFF image data, little-endian, direntries=17, height=196, bps=8, compression=deflate, PhotometricIntepretation=BlackIsZero, orientation=upper-left, width=157

This is a regression comparing to Fedora 23:

$  ./reproducerim 
$  file in.png out.tiff 
in.png:   PNG image data, 157 x 196, 1-bit grayscale, non-interlaced
out.tiff: TIFF image data, little-endian, direntries=16, height=196, bps=1, compression=deflate, PhotometricIntepretation=BlackIsZero, orientation=upper-left, width=157

I found similar bug report at upstream about PHP binding <https://github.com/ImageMagick/ImageMagick/issues/68>, but it does not point to a fix.

Comment 1 Petr Pisar 2016-09-29 13:18:27 UTC
This is not limited to the Perl binding. The convert(1) tool also suffers from the same error.

Comment 2 Petr Pisar 2016-09-29 14:18:27 UTC
I rebuilt 6.9.2.7-1 in F24 and that version is fine. So it it's a regression in ImageMagick between 6.9.2 and 6.9.3. I also built upstream 6.9.5-5 at still suffers from the problem. I reported it to the upstream <https://github.com/ImageMagick/ImageMagick/issues/277>.

Comment 3 Fedora End Of Life 2017-07-25 23:12:37 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 4 Petr Pisar 2017-07-26 14:01:13 UTC
Still issue in ImageMagick-6.9.3.0-7.fc27.x86_64.

Comment 5 Fedora End Of Life 2017-11-16 19:14:23 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2018-05-03 08:27:52 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Petr Pisar 2018-05-03 13:44:21 UTC
ImageMagick-6.9.9.38-1.fc27.x86_64 still broken.

Comment 8 Petr Pisar 2018-05-03 13:45:13 UTC
Created attachment 1430695 [details]
1-bpp PNG input image

Comment 9 Ben Cotton 2018-11-27 15:51:44 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Petr Pisar 2018-11-28 08:48:34 UTC
Still an issue in ImageMagick-6.9.9.38-1.fc28.

Comment 11 Ben Cotton 2019-05-02 20:14:08 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Petr Pisar 2019-05-03 10:33:34 UTC
F29, ImageMagick-1:6.9.9.38-3.fc29.x86_64, is still broken.

Comment 13 Michael Cronenworth 2019-09-14 02:37:06 UTC
Please give the new update a try.

https://bodhi.fedoraproject.org/updates/FEDORA-2019-612d4f64dd

If that doesn't work please inform upstream: https://github.com/ImageMagick/ImageMagick6/issues

Comment 14 Petr Pisar 2019-09-16 10:45:03 UTC
Still broken. I reported to ImageMagick6 project.

Comment 15 Petr Pisar 2019-09-19 11:35:50 UTC
Upstream also closed this bug report <https://github.com/ImageMagick/ImageMagick6/issues/57>. I probably don't understand how upstream uses the bug tracking system. Please you, as ImageMagick package maintainer please step up and report the bug report properly, as I'm probably incompetent to do it.

Comment 16 Ben Cotton 2019-10-31 18:49:42 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Petr Pisar 2019-11-01 07:06:49 UTC
ImageMagick-6.9.10.67-1.fc30.x86_64 still broken.

Comment 18 Ben Cotton 2020-04-30 20:48:24 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 19 Petr Pisar 2020-05-01 08:28:42 UTC
ImageMagick-6.9.10.86-2.fc32.x86_64 still broken.

Comment 20 Ben Cotton 2020-08-11 13:03:12 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 21 Fedora Update System 2021-10-15 08:04:41 UTC
FEDORA-2021-943cf85b04 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-943cf85b04

Comment 22 Fedora Update System 2021-10-15 08:04:42 UTC
FEDORA-2021-3f3f88b4f8 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3f3f88b4f8

Comment 23 Fedora Update System 2021-10-15 08:04:42 UTC
FEDORA-2021-36ae543e55 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-36ae543e55

Comment 24 Petr Pisar 2021-10-15 10:31:15 UTC
ImageMagick-6.9.12.25-1.fc36.x86_64 does not fix it:

$ rpm -qf /usr/bin/convert 
ImageMagick-6.9.12.25-1.fc36.x86_64
$ convert input.png output.tiff
$ file input.png 
input.png: PNG image data, 157 x 196, 1-bit grayscale, non-interlaced
$ file output.tiff 
output.tiff: TIFF image data, little-endian, direntries=17, height=196, bps=8, compression=deflate, PhotometricIntepretation=BlackIsZero, orientation=upper-left, width=157

Comment 25 Ben Cotton 2021-11-04 13:40:04 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 26 Ben Cotton 2021-11-04 14:09:37 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 27 Ben Cotton 2021-11-04 15:06:40 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 28 Fedora Update System 2022-01-30 20:55:00 UTC
FEDORA-2022-14c6d44c23 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-14c6d44c23

Comment 29 Fedora Update System 2022-01-30 20:55:02 UTC
FEDORA-2022-fc3e808731 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-fc3e808731

Comment 30 Fedora Update System 2022-01-31 01:22:18 UTC
FEDORA-2022-fc3e808731 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-fc3e808731`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-fc3e808731

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 31 Fedora Update System 2022-01-31 01:56:29 UTC
FEDORA-2022-14c6d44c23 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-14c6d44c23`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-14c6d44c23

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 32 Sergio Basto 2022-01-31 22:00:04 UTC
 you add to bodhi https://bugzilla.redhat.com/show_bug.cgi?id=1378891 , that is correct or it is a typo ? I think you add the bug #2034280 but as bug was closed it doesn't appear in bodhi update form .

Comment 33 Petr Pisar 2022-02-01 09:28:41 UTC
ImageMagick-6.9.12.37-1.fc35 does not fix this bug:

$ rpm -qf /usr/bin/convert
ImageMagick-6.9.12.37-1.fc35.x86_64
$ convert input.png output.tiff
[test@fedora-35 tmp]$ file input.png 
input.png: PNG image data, 157 x 196, 1-bit grayscale, non-interlaced
$ file output.tiff 
output.tiff: TIFF image data, little-endian, direntries=17, height=196, bps=8, compression=deflate, PhotometricIntepretation=BlackIsZero, orientation=upper-left, width=157

Luya, could you please stop adding random bugs reports to your updates? You already did it the same mistake last time (comment #24).

Comment 34 Ben Cotton 2022-05-12 16:54:40 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 35 Petr Pisar 2022-05-13 09:10:54 UTC
Still affected:

$ rpm -qf /usr/bin/convert
ImageMagick-6.9.12.48-2.fc37.x86_64
$ convert input.png output.tiff
$ file input.png
input.png: PNG image data, 157 x 196, 1-bit grayscale, non-interlaced
$ file output.tiff
output.tiff: TIFF image data, little-endian, direntries=17, height=196, bps=8, compression=deflate, PhotometricIntepretation=BlackIsZero, orientation=upper-left, width=157

Comment 36 Luya Tshimbalanga 2022-07-03 21:26:52 UTC
@ppisar 

I confirm the issue still occur on Fedora 36 as well. Would you like to keep it open or close it as upstream issue.

Comment 37 Petr Pisar 2022-07-04 09:25:19 UTC
It does not matter. I only hope upstream will fix it. In the past upstream just closed my by reports without any explanation or a fix.

Comment 38 Luya Tshimbalanga 2022-07-04 15:37:46 UTC
It looks like the fix is in: https://github.com/ImageMagick/ImageMagick/commit/a69791d9fbe91f1428ab1f75d3493649d96fba19

Comment 39 Ben Cotton 2022-11-29 16:44:46 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 40 Petr Pisar 2022-11-30 09:09:23 UTC
(In reply to Luya Tshimbalanga from comment #38)
> It looks like the fix is in:
> https://github.com/ImageMagick/ImageMagick/commit/
> a69791d9fbe91f1428ab1f75d3493649d96fba19

That's ImageMagick-7. I cannot see any branch for ImageMagick-6 in that repository. Where does Fedora take ImageMagick-6 releases from? I think we need to bother a different upstream. Probably <https://github.com/ImageMagick/ImageMagick6>.

Comment 41 Sergio Basto 2022-11-30 10:58:27 UTC
(In reply to Petr Pisar from comment #40)
> (In reply to Luya Tshimbalanga from comment #38)
> > It looks like the fix is in:
> > https://github.com/ImageMagick/ImageMagick/commit/
> > a69791d9fbe91f1428ab1f75d3493649d96fba19
> 
> That's ImageMagick-7. I cannot see any branch for ImageMagick-6 in that
> repository. Where does Fedora take ImageMagick-6 releases from? I think we
> need to bother a different upstream. Probably
> <https://github.com/ImageMagick/ImageMagick6>.

yes, from https://github.com/ImageMagick/ImageMagick6/tags

Comment 42 Sergio Basto 2022-12-02 20:45:29 UTC
btw I started review request for ImageMagick7 https://bugzilla.redhat.com/show_bug.cgi?id=2150206

Comment 43 Sergio Basto 2023-02-24 14:58:50 UTC
 ImageMagick-7.x.x is on F38 Beta , can you check if this is fixed please 

Thank you

Comment 44 Petr Pisar 2023-02-27 11:09:06 UTC
This seems to be fixed everywhere now. Unless "file" tool lies. Tested with:

ImageMagick-7.1.0.62-1.fc39.x86_64
ImageMagick-7.1.0.57-4.fc38.x86_64
ImageMagick-6.9.12.77-1.fc37.x86_64
ImageMagick-6.9.12.77-1.fc36.x86_64

Comment 45 Petr Pisar 2023-02-27 11:11:45 UTC
All the fixing builds are in stable repositories now.


Note You need to log in before you can comment on or make changes to this bug.