Page 1 of 1

ppm to jpg fails in Debian, works in Win7, fresh installs

Posted: 2014-03-15T17:01:21-07:00
by lyzby
I'm trying to use imagemagick to convert ppm files (from a Canon camera using chdkptp) to jpg on a headless dockstar running debian.

I get an image that is unviewable, and is 512KB. The verbose option yields the following:

Code: Select all

convert -verbose foo.ppm foo.jpg
foo.ppm PPM 720x240 720x240+0+0 8-bit sRGB 518KB 0.020u 0:00.019
foo.ppm=>foo.jpg PPM 720x240 720x240+0+0 8-bit sRGB 518KB 0.040u 0:00.100

convert -version
Version: ImageMagick 6.8.8-7 Q16 armv5tel 2014-03-08 http://www.imagemagick.org
If I copy the file to my PC and run it there (Win7) it works perfectly, and produces a file which is only 42KB.

Code: Select all

convert -verbose foo.ppm foo4.jpg
foo.ppm PPM 720x240 720x240+0+0 8-bit sRGB 518KB 0.000u 0:00.000
foo.ppm=>foo4.jpg PPM 720x240 720x240+0+0 8-bit sRGB 42.6KB 0.062u 0:00.030
Imagemagick was installed today on both the Dockstar and the PC. On the dockstar, I tried both compiling from source and doing "apt-get install imagemagick".

I also tried converting to png, and got an output file of exactly the same length, also unviewable.

Is there anything else I can try?

Re: ppm to jpg fails in Debian, works in Win7, fresh install

Posted: 2014-03-15T17:30:31-07:00
by snibgo
Someone who know unix installations could help more than me, but perhaps your delegates haven't installed, so I'd check:

convert -version
What else does it say? Any delegates?

convert -list delegate
Does it list the delegates?

convert logo: x.png
convert logo: x.jpg
convert logo: x.ppm

Do these work?

Re: ppm to jpg fails in Debian, works in Win7, fresh install

Posted: 2014-03-16T07:42:31-07:00
by lyzby
You are right--no Delegates. How do I add them when compiling the downloaded tar?

Explicitly specifying jpg output fails:

Code: Select all

convert /var/www/foo.ppm -verbose jpeg:/var/www/foo.derp
/var/www/foo.ppm=>jpeg:/var/www/foo.derp PPM 720x240 720x240+0+0 8-bit sRGB 518KB 0.050u 0:00.049
convert: no encode delegate for this image format `jpeg:/var/www/foo.derp' @ warning/constitute.c/WriteImage/1224.
convert: unable to open image `jpeg:/var/www/foo.derp': No such file or directory @ error/blob.c/OpenBlob/2643.

Re: ppm to jpg fails in Debian, works in Win7, fresh install

Posted: 2014-03-17T01:37:02-07:00
by snibgo
Sorry, I don't know, but I think you need to download and install delegates first, eg from http://www.imagemagick.org/download/delegates/

Re: ppm to jpg fails in Debian, works in Win7, fresh install

Posted: 2014-03-17T06:47:35-07:00
by lyzby
Thanks for the response, but after searching, I haven't been able to find how to download and install the delegates. Can someone point to instructions?

When I run "configure --enable-shared", I get, among other things, the following:

Code: Select all

checking for JPEG library is version 6b or later... no
checking if JPEG package is complete... no
JPEG v1           --with-jpeg=yes               no
JPEG-2000         --with-jp2=
PNG               --with-png=yes                no

Re: ppm to jpg fails in Debian, works in Win7, fresh install

Posted: 2014-03-17T10:26:19-07:00
by fmw42
pick the delegates you want, download them, follow the instructions for each in their respective folders to install. typically ./configure, make, make install. Verify that each was installed properly --- look at config.log for errors. Then re-install IM from source

see
http://www.imagemagick.org/download/delegates/

but I would check online to see if there are any more current releases of these delegates.

see also
http://www.imagemagick.org/script/insta ... e.php#unix
http://www.imagemagick.org/script/advan ... lation.php