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

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
lyzby
Posts: 3
Joined: 2014-03-15T16:55:02-07:00
Authentication code: 6789

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

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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?
snibgo's IM pages: im.snibgo.com
lyzby
Posts: 3
Joined: 2014-03-15T16:55:02-07:00
Authentication code: 6789

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

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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/
snibgo's IM pages: im.snibgo.com
lyzby
Posts: 3
Joined: 2014-03-15T16:55:02-07:00
Authentication code: 6789

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

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

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

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