Hi,
We've recently updated ImageMagick to version 6.7.9-1, and since then our batch job (which hasn't been changed) has stopped working properly because ImageMagick seems to keep crashing. The strange thing is that it sometimes works once, but the next job crashes again. We've tried to try the command via the command line and it works, so we don't know what could have gone wrong.
We work with a Linux machine running on RHEL6.
This is the error we got:
Error executing process /usr/bin/convert "/usr/local/tomcat/instances/deinstance/temp/images.jpg" -resize 80x70 -unsharp 1.5x1.0+1.0+0.00784 -size 80x70 xc:#fff +swap -gravity center -composite "/var/www/html/imagefolder/resized-image.jpg": 000000 fd:04 18363 /usr/lib64/libMagickCore.so.2.0.0
7fcf85726000-7fcf85926000 ---p 001ce000 fd:04 18363 /usr/lib64/libMagickCore.so.2.0.0
7fcf85926000-7fcf85977000 rw-p 001ce000 fd:04 18363 /usr/lib64/libMagickCore.so.2.0.0
7fcf85977000-7fcf85990000 rw-p 00000000 00:00 0
7fcf85993000-7fcf8599a000 r--s 00000000 fd:04 313 /usr/lib64/gconv/gconv-modules.cache
7fcf8599a000-7fcf8599b000 rw-p 00000000 00:00 0
7fff260fb000-7fff26113000 rw-p 00000000 00:00 0 [stack]
7fff261ff000-7fff26200000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Any help or pointer where we should look for the cause will be very much appreciated.
resizing stop working after updating imagemagick
-
- Posts: 4
- Joined: 2015-05-15T01:40:26-07:00
- Authentication code: 6789
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: resizing stop working after updating imagemagick
6.7.9.1 is still over 200 versions old. If you upgraded to that version, why not upgrade to the current version 6.9.1.2. Around the time of 6.7.9.1 IM was undergoing some radical changes. So there might have been bugs in that release. See viewtopic.php?f=4&t=21269
try putting double quotes around " #fff as xc:"#fff" or just use white as xc:white
try putting double quotes around " #fff as xc:"#fff" or just use white as xc:white
-
- Posts: 4
- Joined: 2015-05-15T01:40:26-07:00
- Authentication code: 6789
Re: resizing stop working after updating imagemagick
Hi,
Sorry to get back so late. I was first out of office and then it took some time to test.
I've now changed the command to xc:white, and it does seem to work better. Thanks for the suggestion, Fred.
It's still unstable though, and sometimes the job hangs without throwing an error. After a restart it will then work again.
We use this version because this is the supported version by RHEL6. We've created a ticket to request an update, but until that happens, I'm afraid we're stuck in this unstable release.
Sorry to get back so late. I was first out of office and then it took some time to test.
I've now changed the command to xc:white, and it does seem to work better. Thanks for the suggestion, Fred.
It's still unstable though, and sometimes the job hangs without throwing an error. After a restart it will then work again.
We use this version because this is the supported version by RHEL6. We've created a ticket to request an update, but until that happens, I'm afraid we're stuck in this unstable release.
Re: resizing stop working after updating imagemagick
What happens if you use -extent as I assume you are putting your resized image onto a white background:
Code: Select all
/usr/bin/convert "/usr/local/tomcat/instances/deinstance/temp/images.jpg" -resize 80x70 -unsharp 1.5x1.0+1.0+0.00784 -background #fff -gravity center -extent 80x70 "/var/www/html/imagefolder/resized-image.jpg": 000000 fd:04
-
- Posts: 4
- Joined: 2015-05-15T01:40:26-07:00
- Authentication code: 6789
Re: resizing stop working after updating imagemagick
We have upgraded to version 6.9.1-4.
The job has been working great, until it has to resize an image with a CMYK colorspace (instead of sRGB) and transparent background.
Is ImageMagick unable to process this type of image?
FYI, we're still using the original commands (we resize to different formats). This was the command that hanged:
/usr/bin/convert "/usr/local/tomcat/instances/deinstance/temp/images.jpg" -resize 320x480 -unsharp 0.5x1.0+0.8+0.0784 -size 320x480 xc:white +swap -gravity center -composite "/var/www/html/imagefolder/resized-image.jpg"
The job has been working great, until it has to resize an image with a CMYK colorspace (instead of sRGB) and transparent background.
Is ImageMagick unable to process this type of image?
FYI, we're still using the original commands (we resize to different formats). This was the command that hanged:
/usr/bin/convert "/usr/local/tomcat/instances/deinstance/temp/images.jpg" -resize 320x480 -unsharp 0.5x1.0+0.8+0.0784 -size 320x480 xc:white +swap -gravity center -composite "/var/www/html/imagefolder/resized-image.jpg"
Re: resizing stop working after updating imagemagick
Can you add a link to the file that causes this issue?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: resizing stop working after updating imagemagick
If you publish your input CMYK file images.jpg, someone might take a look.
I think using "-composite" on images of different colorspaces will end badly, although it shouldn't hang.
I think using "-composite" on images of different colorspaces will end badly, although it shouldn't hang.
snibgo's IM pages: im.snibgo.com
-
- Posts: 4
- Joined: 2015-05-15T01:40:26-07:00
- Authentication code: 6789
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: resizing stop working after updating imagemagick
The command doesn't hang for me, IM v6.9.1-0 on Windows 8.1.
"-composite" should have both images of the same type, either RGB or CMYK. For eaxmple, to make them CMYK:
"-composite" should have both images of the same type, either RGB or CMYK. For eaxmple, to make them CMYK:
Code: Select all
convert testc.jpg -resize 320x480 -unsharp 0.5x1.0+0.8+0.0784 -size 320x480 ( xc:white -colorspace CMYK ) +swap -gravity center -composite x.jpg
snibgo's IM pages: im.snibgo.com