Page 1 of 1

where to find more info about delegate libraries?

Posted: 2008-06-11T09:19:11-07:00
by pod_person
I'm compiling ImageMagick for openwrt. I've got it to compile and convert runs, but the convert utility (the only utility I need) can't find the jpeg delegate library.

I don't have a native toolchain for the target platform, so I have to cross-compile.

The jpeg tests in the imagemagick configure script insist on trying to compile and run code, which doesn't work when cross-compiling since the code won't run on the host platform. I got past that by modifying the configure script to force jpeg compilation. I think the jpeg delegate library got compiled (there are ".lo" and ".Plo" files in the build directory), but it doesn't seem to get installed in the appropriate location. I suspect that I need to do something to force the installation.

I have the following files, one of which I suspect is the delegate library:
./coders/.deps/coders_jpeg_la-jpeg.Plo
./coders/.deps/magick_libMagickCore_la-jpeg.Plo
./coders/magick_libMagickCore_la-jpeg.lo

How do I identify the jpeg delegate library and how do I figure out where e.g. the "convert" utility expects to find it at runtime?
More generally, is there any documentation giving more info about how delegates work?

- harv

Re: where to find more info about delegate libraries?

Posted: 2008-06-11T09:24:45-07:00
by fmw42
I am no expert on all this. But you can find the delegates at:

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

Installation of each may vary a bit, but generally it is just ./configure, make, (sudo) install.

See:

http://www.imagemagick.org/script/advan ... lation.php

Re: where to find more info about delegate libraries?

Posted: 2008-06-11T09:35:37-07:00
by pod_person
Unfortunately, I don't think that's it. I already have the jpeg-6b library compiled and installed I'm pretty sure that I pointed the ImageMagick build at the correct headers and that the correct library was available for linking. So I think I'm past that point in the process.

But I'm not certain, because "convert -list format" doesn't list JPEG. I don't know for certain whether that's because the jpeg delegate library is not in the correct location, or whether there's still a build problem.

The jpeg.c file compiles and some .lo and .Plo modules get built, which is why I suspect that the problem may be simply that the delegate is not installed in the correct location. But I'm not sure which file is the required delegate library, nor where the correct install path is located.

Re: where to find more info about delegate libraries?

Posted: 2008-06-11T14:02:40-07:00
by fmw42
check if your jpg delegate is installed

convert -list configure

look for the line that starts with DELEGATES

Mine says:

DELEGATES bzlib fontconfig freetype gs jpeg jp2 lcms lqr openexr png tiff x11 xml zlib


note jp2 is for jpeg2000

Re: where to find more info about delegate libraries?

Posted: 2008-06-11T14:59:18-07:00
by pod_person
I have:

DELEGATES jpeg zlib

so it looks like convert thinks the delegate should be there. Or, at minimum, convert thinks the configure script gave instructions to build the jpeg delegate. Thanks for the tip.

Nonetheless, convert refuses to process jpeg images:

# convert CRW_4820.jpg -resize 10% xx.jpg
convert: no decode delegate for this image format `CRW_4820.jpg'.
convert: missing an image filename `xx.jpg'.

So I still think the delegate is probably not installed in the correct location. Which brings me back to my original question: what is the compiled jpeg delegate library called, and how do I figure out where it's supposed to be installed so it can be loaded at runtime?

Re: where to find more info about delegate libraries?

Posted: 2008-06-11T15:42:24-07:00
by fmw42
post a link to one of your images and I will see if I can convert it to jpeg.

Did you install IM or get the binary?

I am no expert on these things, but on my Mac, I installed IM and the delegates and most of the delegate stuff I think is in /usr/local/bin and /usr/local/share

I don't know where else to look.

Does the jpg delegate library folder INSTALL file tell you anything about where it will put stuff?

Re: where to find more info about delegate libraries?

Posted: 2008-06-11T15:51:39-07:00
by pod_person
Thanks for the offer, but that's not the problem. I know the images are OK. I just re-tested that on another host that does have a working ImageMagick setup. The problem is with the installation I've built for my openwrt platform. I'm pretty confident that the issue is that the delegate is not installed in the correct path. I just need to find out what is the correct path.

Re: where to find more info about delegate libraries?

Posted: 2008-11-03T07:12:53-07:00
by seboeh
You are absolutly right. Probably the a different directory structure for the libraries caused this error of "no delegate found ...".

I introduced a poll for a solution to reduce this mistakes:
viewtopic.php?f=2&t=12400

greets seboeh