8:6.9.7.4+dfsg-16ubuntu6.11 break pcx 1bit creation

Bug #1932297 reported by Georg Pelz
258
This bug affects 1 person
Affects Status Importance Assigned to Milestone
imagemagick (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Today 8:6.9.7.4+dfsg-16ubuntu6.11 got installed on my server 18.04 server.

---
Start-Date: 2021-06-17 06:26:11
Commandline: /usr/bin/unattended-upgrade
Upgrade: imagemagick:amd64 (8:6.9.7.4+dfsg-16ubuntu6.9, 8:6.9.7.4+dfsg-16ubuntu6.11)
End-Date: 2021-06-17 06:26:14

Start-Date: 2021-06-17 06:26:19
Commandline: /usr/bin/unattended-upgrade
Upgrade: imagemagick-6.q16:amd64 (8:6.9.7.4+dfsg-16ubuntu6.9, 8:6.9.7.4+dfsg-16ubuntu6.11)
End-Date: 2021-06-17 06:26:23

Start-Date: 2021-06-17 06:26:27
Commandline: /usr/bin/unattended-upgrade
Upgrade: libimage-magick-q16-perl:amd64 (8:6.9.7.4+dfsg-16ubuntu6.9, 8:6.9.7.4+dfsg-16ubuntu6.11)
End-Date: 2021-06-17 06:26:29

Start-Date: 2021-06-17 06:26:33
Commandline: /usr/bin/unattended-upgrade
Upgrade: libmagick++-6.q16-7:amd64 (8:6.9.7.4+dfsg-16ubuntu6.9, 8:6.9.7.4+dfsg-16ubuntu6.11)
End-Date: 2021-06-17 06:26:36
---

before the update calling:

convert -crop 1200x800+1+1 +repage -rotate 180 -crop +2+1 +repage -rotate -90 -bordercolor white -border 1x1 -resize 1200 upsversandauftrag_etikett_1848655-1_test.gif -colorspace Gray -depth 1 -colors 2 -depth 1 -colorspace Gray upsversandauftrag_etikett_1848655-1.pcx

to modify UPS labels to send them to my label printer worked fine.
file upsversandauftrag_etikett_1848655-1.pcx
properly returned:
upsversandauftrag_etikett_1848655-1_mitalterVersion.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [1199, 1799], 1-bit colour, RLE compressed

now calling the same calls returns a:
upsversandauftrag_etikett_1848655-1.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [1199, 1799], 3 planes each of 8-bit colour, RLE compressed
and a file which can't be fed to my label printer.

file size of the old output was 135K, while the new one is 619K.

Only way to fix this so far was going back to 8:6.9.7.4+dfsg-16ubuntu6 (8:6.9.7.4+dfsg-16ubuntu6.9 wasn't available) and hold any updates for those packages. :/

Revision history for this message
Georg Pelz (gpelz) wrote :
Revision history for this message
Georg Pelz (gpelz) wrote :
Revision history for this message
Georg Pelz (gpelz) wrote (last edit ):

this also happen on Ubuntu 20.04.2, so my guess is that this is something that was introduced after ubuntu6.9

---

I compiled and tested 'ImageMagick-6.9.12-16/'

/Downloads/ImageMagick-6.9.12-16/utilities$ ./convert -crop 1200x800+1+1 +repage -rotate 180 -crop +2+1 +repage -rotate -90 -bordercolor white -border 1x1 -resize 1200 /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1_test.gif -colorspace Gray -depth 1 -colors 2 -depth 1 -colorspace Gray /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx && file /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx && ls -lah /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx
convert: UnableToOpenConfigureFile `colors.xml' @ warning/configure.c/GetConfigureOptions/681.
/home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [1199, 1799], 3 planes each of 8-bit colour, RLE compressed
-rw-rw-r-- 1 gpelz gpelz 619K Jun 18 07:53 /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx

 and it gives the same output (+ the UnableToOpenConfigureFile-warning)

----
testing with ImageMagick-7.1.0-1
gpelz@ho01:~/Downloads/ImageMagick-7.1.0-1/utilities$ ./magick convert -crop 1200x800+1+1 +repage -rotate 180 -crop +2+1 +repage -rotate -90 -bordercolor white -border 1x1 -resize 1200 /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1_test.gif -colorspace Gray -depth 1 -colors 2 /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx && file /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx && ls -lah /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx
convert: UnableToOpenConfigureFile `colors.xml' @ warning/configure.c/GetConfigureOptions/702.
/home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [1199, 1799], 1-bit colour, RLE compressed
-rw-rw-r-- 1 gpelz gpelz 130K Jun 18 08:52 /home/gpelz/Schreibtisch/upsversandauftrag_etikett_1848655-1.pcx

the problem seems to be fixed.

-> would be nice if the 6.9 branch could be fixed again.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for reporting this issue. I am going to need a test image to reproduce this. I tried reproducing it with some gif test images, but didn't not manage to find one that displays the broken behaviour.

Changed in imagemagick (Ubuntu):
status: New → Incomplete
information type: Public → Public Security
Revision history for this message
Georg Pelz (gpelz) wrote (last edit ):

send you an email with the gif I used.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Unfortunately, I still can't reproduce the issue with the test file you've sent me:

$ dpkg -l | grep imagemagick
ii imagemagick 8:6.9.7.4+dfsg-16ubuntu6.11 amd64 image manipulation programs -- binaries
ii imagemagick-6-common 8:6.9.7.4+dfsg-16ubuntu6.11 all image manipulation programs -- infrastructure
ii imagemagick-6.q16 8:6.9.7.4+dfsg-16ubuntu6.11 amd64 image manipulation programs -- quantum depth Q16

$ convert -crop 1200x800+1+1 +repage -rotate 180 -crop +2+1 +repage -rotate -90 -bordercolor white -border 1x1 -resize 1200 upsversandauftrag_etikett_1848655-1_test.gif -colorspace Gray -depth 1 -colors 2 -depth 1 -colorspace Gray upsversandauftrag_etikett_1848655-1.pcx

$ file upsversandauftrag_etikett_1848655-1.pcx
upsversandauftrag_etikett_1848655-1.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [1199, 1799], 1-bit colour, RLE compressed

Revision history for this message
Georg Pelz (gpelz) wrote :

Okay, I tried it on another 18.04 system and there the calls work properly.

When running the calls on my desktop system (20.04) I get:
$ dpkg -l | grep imagemagick
ii imagemagick 8:6.9.10.23+dfsg-2.1ubuntu11.4 amd64 image manipulation programs -- binaries
ii imagemagick-6-common 8:6.9.10.23+dfsg-2.1ubuntu11.4 all image manipulation programs -- infrastructure
ii imagemagick-6.q16 8:6.9.10.23+dfsg-2.1ubuntu11.4 amd64 image manipulation programs -- quantum depth Q16

$ convert -crop 1200x800+1+1 +repage -rotate 180 -crop +2+1 +repage -rotate -90 -bordercolor white -border 1x1 -resize 1200 upsversandauftrag_etikett_1848655-1_test.gif -colorspace Gray -depth 1 -colors 2 -depth 1 -colorspace Gray upsversandauftrag_etikett_1848655-1.pcx

$ file upsversandauftrag_etikett_1848655-1.pcx
upsversandauftrag_etikett_1848655-1.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [1199, 1799], 3 planes each of 8-bit colour, RLE compressed

so there I got the issue too. :/

-> I'll do some more and try to figure out what the difference between my two 18.04 server systems is. But from the looks of it, it's something unique to some of my systems and not a general imagemagick bug like I feared.

Thanks for checking.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

I can reproduce it on 20.04, but it's not a regression caused by a security update. This is the original package 20.04 shipped with:

$ dpkg -l | grep imagemagick
ii imagemagick-6-common 8:6.9.10.23+dfsg-2.1ubuntu11 all image manipulation programs -- infrastructure
ii imagemagick-6.q16 8:6.9.10.23+dfsg-2.1ubuntu11 amd64 image manipulation programs -- quantum depth Q16

$ convert -crop 1200x800+1+1 +repage -rotate 180 -crop +2+1 +repage -rotate -90 -bordercolor white -border 1x1 -resize 1200 upsversandauftrag_etikett_1848655-1_test.gif -colorspace Gray -depth 1 -colors 2 -depth 1 -colorspace Gray upsversandauftrag_etikett_1848655-1.pcx

$ file upsversandauftrag_etikett_1848655-1.pcx
upsversandauftrag_etikett_1848655-1.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [1199, 1799], 3 planes each of 8-bit colour, RLE compressed

Revision history for this message
Georg Pelz (gpelz) wrote :

I found a workaround by using an intermediate file which works with 20.04 and on my 18.04 system.

first crop&co, but output to .gif using:
convert -crop 1200x800+1+1 +repage -rotate 180 -crop +2+1 +repage -rotate -90 -bordercolor white -border 1x1 -resize 1200 upsversandauftrag_etikett_1848655-1_test.gif -colorspace Gray -depth 1 -colors 2 -depth 1 upsversandauftrag_etikett_1848655-1_bw.gif

file upsversandauftrag_etikett_1848655-1_bw.gif
upsversandauftrag_etikett_1848655-1_bw.gif: GIF image data, version 89a, 1200 x 1800

then convert the new .gif to pcx using:
convert upsversandauftrag_etikett_1848655-1_bw.gif upsversandauftrag_etikett_1848655-1.pcx

file upsversandauftrag_etikett_1848655-1.pcx
upsversandauftrag_etikett_1848655-1.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [1199, 1799], 1-bit colour, RLE compressed

-> no clue, why the additional step is necessary, but it fixes the issue for me.
May be the workaround also helps to figure out what changed in imagemagick that breaks the direct gif->pcx conversion with the cropping&co.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for imagemagick (Ubuntu) because there has been no activity for 60 days.]

Changed in imagemagick (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.