Page 1 of 1

Bogus input colorspace” for “convert” command when convertin

Posted: 2011-12-26T14:39:55-07:00
by jywarren
We were upgraded from ImageMagick 6.5.x to 6.6.x when we upgraded our server to Ubuntu Server 11.10 Oneiric Ocelot (from 10.04 Lucid Lynx) and this ImageMagick "convert" command stopped working. It's part of the free and open source MapKnitter.org map rectifying service by PublicLaboratory.org.

Lines 191 and on of /app/models/warpable.rb (see source link below) typically generate something like:

Code: Select all

convert -background transparent -contrast-stretch 0 3545-IMG_5407.JPG -crop 4716x4716+0+0! -background transparent -flatten -matte -virtual-pixel white +antialias -distort Perspective '0,0 0,3746 3648,0 1334,0 3648,2736 3901,1458 0,2736 2434,4716' -background transparent -flatten +repage 3545.tif
Which is now throwing:

Code: Select all

convert: Bogus input colorspace. `JPEGLib' @ warning/tiff.c/TIFFErrors/493.
I know it's a complex command; the simple version:

Code: Select all

convert 3545-IMG_5407.JPG 3545.tif
actually works without errors. So something in the longer command is causing trouble. Apologies in advance for a kind of ridiculously long list of modifiers.

Adding -colorspace RGB in various locations doesn't seem to help, as has been suggested in some forums I've perused.

http://www.imagemagick.org/script/comma ... colorspace

Crappy. Not making much progress. Please help!

Context here: https://github.com/jywarren/mapknitter/issues/76

Re: Bogus input colorspace” for “convert” command when conve

Posted: 2011-12-26T15:37:11-07:00
by Bonzo
I had the same error as you running your code. There are some strange things I can see in your code:
1/ Image should be read in first after convert.
2/ You do not need all the "-background transparent".

So the map rectifying service generates the convert line?

Anyway even after modifying your code I still had a different error and hopefuly somebody else can help you out.

Re: Bogus input colorspace” for “convert” command when conve

Posted: 2011-12-26T15:44:45-07:00
by fmw42
The order of control points was changed to a different order at one point in -distort perspective. see http://www.imagemagick.org/Usage/distor ... rol_points. But I believe that this was after version 6.3.6. So I am not sure if that is your problem or not. Though it does appear to me that you might be using the older format, however I cannot tell for sure.