Bogus input colorspace” for “convert” command when convertin

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jywarren
Posts: 1
Joined: 2011-12-26T14:26:51-07:00
Authentication code: 8675308

Bogus input colorspace” for “convert” command when convertin

Post 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
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

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

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
Post Reply