On Centos 5.11, using the latest ImageMagick as of 3/25/17 (or older versions, it doesn't matter), the following produces bad or blank GIF files:
convert -filter Cubic -geometry 32x32 infile.png outfile.gif
But this works:
convert -filter cubic -geometry 32x32 infile.png outfile.gif
By changing the C in Cubic from uppercase to lowercase, it fixed the problem. This, in itself, is a bug.
convert -filter Cubic doesn't work but convert -filter cubic does
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: convert -filter Cubic doesn't work but convert -filter cubic does
Personally, I don't use "-geometry" to resize. But if you want that, the correct syntax is after the input file, not before it:
These both work for me, with IM v6.9.5-3.
Code: Select all
convert toes.png -filter cubic -geometry 32x32 x.gif
convert toes.png -filter Cubic -geometry 32x32 x.gif
snibgo's IM pages: im.snibgo.com
Re: convert -filter Cubic doesn't work but convert -filter cubic does
Unfortunately we cannot reproduce the problem (IMv7 7.0.5-3):
Code: Select all
-> convert -filter Cubic -geometry 32x32 infile.png reference.gif
-> convert -filter cubic -geometry 32x32 infile.png outfile.gif
-> compare -metric rmse outfile.gif reference.gif null:
0 (0)
Re: convert -filter Cubic doesn't work but convert -filter cubic does
Folks, sorry to waste your time. The shell in which I was using Cubic did not have the path rehashed so it was using ImageMagick 6.7.2-7. The one with cubic was using ImageMagick 7.0.5-3. The compare result for the difference in output of those versions using the command you gave is "25.7125 (0.000392348)". However the result image is corrupt. So it must have been fixed between 6.7 and 7.0.