(Gallery2) Composite fails test -- OS X 10.4.9

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
wlbentley

(Gallery2) Composite fails test -- OS X 10.4.9

Post by wlbentley »

Hello,

I'm trying to get ImageMagick to work with Gallery2 (v.2.2.1). I've tried installing three times, once using the OS X universal binary, once downloading, compiling, etc. the source files, lastly using MacPorts. They all produce the same result: ImageMagick seems correctly installed, but when I try to activate it in Gallery2, "composite" fails.

Universal Binary: ImageMagick-universal-apple-darwin8.9.1.tar
Source Version: ImageMagick-6.3.2-9.tar.gz
MacPorts: MacPorts-1.4.0-10.4.dmg

Apache: 1.3.33
PHP: 5.2.2

When I run the composite command (as shown in the debug output) from the command line, it gives the same result.

I have noticed others having the same problem over various versions of Gallery/ImageMagick, but found no solution.

Can anyone tell me what causes this failure, and how to fix it? I've heard so much good about ImageMagick, and it's frustrating not to be able to use it!

Thanks in advance for any help you can offer!

Here's the debug data that Gallery2 presents when the "Test" fails:

Code: Select all

is_dir(/usr/local/bin/)
Loading plugin imagemagick
imagemagick plugin successfully instantiated
Check the version of the imagemagick plugin
The version of the imagemagick plugin is ok
getcwd()
chdir(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/)
file_exists(/usr/local/bin/gm)
file_exists(/usr/local/bin/identify)
getParameter exec.beNice for core plugin
Executing: ( "/usr/local/bin/identify" 
"/Library/WebServer/Documents/gallery2/modules/imagemagick/data/test.gif" )
2>/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgLRk6m0
getParameter exec.expectedStatus for core plugin
file_exists(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgLRk6m0)
filesize(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgLRk6m0)
unlink(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgLRk6m0)
Regular Output:
/Library/WebServer/Documents/gallery2/modules/imagemagick/data/test.gif GIF
50x50 50x50+0+0 PseudoClass 8c 8-bit 232b
Error Output:
Status: 0 (expected 0)
file_exists(/usr/local/bin/gm)
tempnam(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/, imgk_)
file_exists(/usr/local/bin/convert)
Executing: ( "/usr/local/bin/convert"  "-size"  "200x200"  "-geometry" 
"200x200" 
"/Library/WebServer/Documents/gallery2/modules/imagemagick/data/test.gif" 
"/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/imgk_ptE2QR" )
2>/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgEz8Hcb
file_exists(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgEz8Hcb)
filesize(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgEz8Hcb)
unlink(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgEz8Hcb)
Regular Output:
Error Output:
Status: 0 (expected 0)
unlink(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/imgk_ptE2QR)
file_exists(/usr/local/bin/gm)
file_exists(/usr/local/bin/combine)
file_exists(/usr/local/bin/composite)
is_executable(/usr/local/bin/composite)
file_exists(/usr/local/bin/gm)
tempnam(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/, imgk_)
Executing: ( "/usr/local/bin/composite"  "-geometry"  "+0+0" 
"/Library/WebServer/Documents/gallery2/modules/imagemagick/data/test.jpg" 
"/Library/WebServer/Documents/gallery2/modules/imagemagick/data/test.gif" 
"/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/imgk_OMBHME" )
2>/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgDq68ZY
file_exists(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgDq68ZY)
filesize(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgDq68ZY)
fopen(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgDq68ZY,
r, 0)
feof(Resource id #94)
fgets(Resource id #94, 4096)
feof(Resource id #94)
fgets(Resource id #94, 4096)
feof(Resource id #94)
fgets(Resource id #94, 4096)
feof(Resource id #94)
fclose(Resource id #94)
unlink(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/g2dbgDq68ZY)
Regular Output:
Error Output:
composite: no decode delegate for this image format
`/Library/WebServer/Documents/gallery2/modules/imagemagick/data/test.jpg'.
composite: missing an image filename
`/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/imgk_OMBHME'.
Status: 1 (expected 0)
unlink(/Library/WebServer/Documents/gallery2/g2data4y0e35y/tmp/imgk_OMBHME)
chdir(/Library/WebServer/Documents/gallery2)
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: (Gallery2) Composite fails test -- OS X 10.4.9

Post by anthony »

composite: no decode delegate for this image format
Looks like IM was not installed with JPEG library support.

Check with

Code: Select all

convert -list format
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
wlbentley

Re: (Gallery2) Composite fails test -- OS X 10.4.9

Post by wlbentley »

Hi, and thanks for your suggestion. It looks to me like JPEG was installed. Doesn't it? It's a puzzle.

Here are the results:

Code: Select all

convert -list format
   Format  Module    Mode  Description
-------------------------------------------------------------------------------
        A* RAW       rw+   Raw alpha samples
      ART* ART       r--   PFS: 1st Publisher
           Format originally used on the Macintosh (MacPaint?) and later used
           for PFS: 1st Publisher clip art.  NOT the AOL ART format.
      AVI* AVI       r--   Microsoft Audio/Visual Interleaved
      AVS* AVS       rw+   AVS X image
        B* RAW       rw+   Raw blue samples
      BMP* BMP       rw-   Microsoft Windows bitmap image
     BMP2* BMP       -w-   Microsoft Windows bitmap image v2
     BMP3* BMP       -w-   Microsoft Windows bitmap image v3
        C* RAW       rw+   Raw cyan samples
    CACHE* CACHE     ---   Magick Persistent Cache image format
  CAPTION* CAPTION   r--   Image caption
      CIN* CIN       rw+   Cineon Image File
      CIP* CIP       -w-   Cisco IP phone image format
     CLIP* CLIP      -w+   Image Clip Mask
     CMYK* CMYK      rw+   Raw cyan, magenta, yellow, and black samples
    CMYKA* CMYK      rw+   Raw cyan, magenta, yellow, black, and opacity samples
      CUR* CUR       rw-   Microsoft icon
      CUT* CUT       r--   DR Halo
      DCM* DCM       r--   Digital Imaging and Communications in Medicine image
           DICOM is used by the medical community for images like X-rays.  The
           specification, "Digital Imaging and Communications in Medicine
           (DICOM)", is available at http://medical.nema.org/.  In particular,
           see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS),
           and supplement 61 which adds JPEG-2000 encoding.
      DCX* PCX       rw+   ZSoft IBM PC multi-page Paintbrush
    DFONT* TTF       r--   Multi-face font package (Freetype 2.3.4)
      DOT  DOT       ---   Graphviz
      DPS  DPS       r--   Display Postscript Interpreter
      DPX* DPX       rw+   SMPTE 268M-2003 (DPX 2.0)
           Digital Moving Picture Exchange Bitmap, Version 2.0.
           See SMPTE 268M-2003 specification at http://www.smtpe.org
           
     EPDF  PDF       rw-   Encapsulated Portable Document Format
      EPI  PS        rw-   Encapsulated PostScript Interchange format
      EPS  PS        rw-   Encapsulated PostScript
     EPS2* PS2       -w-   Level II Encapsulated PostScript
     EPS3* PS3       -w+   Level III Encapsulated PostScript
     EPSF  PS        rw-   Encapsulated PostScript
     EPSI  PS        rw-   Encapsulated PostScript Interchange format
      EPT  EPT       rw-   Encapsulated PostScript with TIFF preview
     EPT2  EPT       rw-   Encapsulated PostScript Level II with TIFF preview
     EPT3  EPT       rw+   Encapsulated PostScript Level III with TIFF preview
      EXR* EXR       ---   High Dynamic-range (HDR)
      FAX* FAX       rw+   Group 3 FAX
           See TIFF format.  Note that FAX machines use non-square pixels which
           are 1.5 times wider than they are tall but computer displays use
           square pixels. FAX images may appear to be narrow unless they are
           explicitly resized using a resize specification of "150x100%".
     FITS* FITS      rw-   Flexible Image Transport System
  FRACTAL* PLASMA    r--   Plasma fractal image
      FTS* FTS       rw-   Flexible Image Transport System
        G* RAW       rw+   Raw green samples
       G3* FAX       rw-   Group 3 FAX
      GIF* GIF       rw+   CompuServe graphics interchange format
    GIF87* GIF       rw-   CompuServe graphics interchange format (version 87a)
 GRADIENT* GRADIENT  r--   Gradual passing from one shade to another
     GRAY* GRAY      rw+   Raw gray samples
HISTOGRAM* HISTOGRAM -w-   Histogram of the image
      HTM* HTML      -w-   Hypertext Markup Language and a client-side image map
     HTML* HTML      -w-   Hypertext Markup Language and a client-side image map
      ICB* TGA       rw+   Truevision Targa image
      ICO* ICON      rw+   Microsoft icon
     ICON* ICON      rw-   Microsoft icon
     INFO  INFO      -w+   The image format and characteristics
      JNG* PNG       rw-   JPEG Network Graphics
           See http://www.libpng.org/pub/mng/ for details about the JNG format.
           The JNG 1.0 specification is available there and at
           ftp://swrinde.nde.swri.edu/pub/mng/documents/.
     JPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)
      JPG* JPEG      rw-   Joint Photographic Experts Group JFIF format
        K* RAW       rw+   Raw black samples
    LABEL* LABEL     r--   Image label
        M* RAW       rw+   Raw magenta samples
      M2V  MPEG      rw+   MPEG Video Stream
      MAP* MAP       rw-   Colormap intensities and indices
      MAT* MAT       rw+   MATLAB image format
    MATTE* MATTE     -w+   MATTE format
     MIFF* MIFF      rw+   Magick Image File Format
      MNG* PNG       rw+   Multiple-image Network Graphics (libpng 1.2.18)
           See http://www.libpng.org/pub/mng/ for details about the MNG format.
           The MNG 1.0 specification is available there and at
           ftp://swrinde.nde.swri.edu/pub/mng/documents/.
     MONO* MONO      rw-   Bi-level bitmap in least-significant-byte first order
      MPC* MPC       rw+   Magick Persistent Cache image format
     MPEG  MPEG      rw+   MPEG Video Stream
      MPG  MPEG      rw+   MPEG Video Stream
      MSL* MSL       rw+   Magick Scripting Language
     MSVG* SVG       rw+   ImageMagick's own SVG internal renderer
      MTV* MTV       rw+   MTV Raytracing image format
      MVG* MVG       rw-   Magick Vector Graphics
     NULL* NULL      rw-   Constant image of uniform color
        O* RAW       rw+   Raw opacity samples
      OTB* OTB       rw-   On-the-air bitmap
      OTF* TTF       r--   Open Type font (Freetype 2.3.4)
      PAL* UYVY      rw-   16bit/pixel interleaved YUV
     PALM* PALM      rw+   Palm pixmap
      PAM* PNM       rw+   Common 2-dimensional bitmap format
  PATTERN* PATTERN   r--   Predefined pattern
      PBM* PNM       rw+   Portable bitmap format (black and white)
      PCD* PCD       rw-   Photo CD
     PCDS* PCD       rw-   Photo CD
      PCL  PCL       rw-   Printer Control Language
      PCT* PICT      rw-   Apple Macintosh QuickDraw/PICT
      PCX* PCX       rw-   ZSoft IBM PC Paintbrush
      PDB* PDB       rw+   Palm Database ImageViewer Format
      PDF  PDF       rw+   Portable Document Format
      PFA* TTF       r--   Postscript Type 1 font (ASCII) (Freetype 2.3.4)
      PFB* TTF       r--   Postscript Type 1 font (binary) (Freetype 2.3.4)
      PFM* PFM       rw+   Portable float format
      PGM* PNM       rw+   Portable graymap format (gray scale)
    PICON* XPM       rw-   Personal Icon
     PICT* PICT      rw-   Apple Macintosh QuickDraw/PICT
      PIX* PIX       r--   Alias/Wavefront RLE image format
    PJPEG* JPEG      rw-   Progessive Joint Photographic Experts Group JFIF
   PLASMA* PLASMA    r--   Plasma fractal image
      PNG* PNG       rw-   Portable Network Graphics (libpng 1.2.18)
           See http://www.libpng.org/ for details about the PNG format.  The
           PNG 1.2 specification is available there and at
           ftp://swrinde.nde.swri.edu/pub/png/documents/.
    PNG24* PNG       rw-   24-bit RGB PNG, opaque only (zlib 1.2.3)
    PNG32* PNG       rw-   32-bit RGBA PNG, semitransparency OK
     PNG8* PNG       rw-   8-bit indexed PNG, binary transparency only
      PNM* PNM       rw+   Portable anymap
      PPM* PNM       rw+   Portable pixmap format (color)
  PREVIEW* PREVIEW   -w-   Show a preview an image enhancement, effect, or f/x
       PS  PS        rw+   PostScript
      PS2* PS2       -w+   Level II PostScript
      PS3* PS3       -w+   Level III PostScript
      PSD* PSD       rw+   Adobe Photoshop bitmap
     PTIF* TIFF      rw-   Pyramid encoded TIFF
      PWP* PWP       r--   Seattle Film Works
        R* RAW       rw+   Raw red samples
      RAS* SUN       rw+   SUN Rasterfile
      RGB* RGB       rw+   Raw red, green, and blue samples
     RGBA* RGB       rw+   Raw red, green, blue, and alpha samples
     RGBO* RGB       rw+   Raw red, green, blue, and opacity samples
      RLA* RLA       r--   Alias/Wavefront image
      RLE* RLE       r--   Utah Run length encoded image
      SCR* SCR       r--   ZX-Spectrum SCREEN$
      SCT* SCT       r--   Scitex HandShake
      SFW* SFW       r--   Seattle Film Works
      SGI* SGI       rw+   Irix RGB image
    SHTML* HTML      -w-   Hypertext Markup Language and a client-side image map
  STEGANO* STEGANO   r--   Steganographic image
      SUN* SUN       rw+   SUN Rasterfile
      SVG* SVG       rw+   Scalable Vector Graphics (XML 2.6.28)
     SVGZ* SVG       rw+   Compressed Scalable Vector Graphics (XML 2.6.28)
     TEXT* TXT       rw+   Text
      TGA* TGA       rw+   Truevision Targa image
THUMBNAIL* THUMBNAIL -w+   EXIF Profile Thumbnail
     TIFF* TIFF      rw+   Tagged Image File Format (LIBTIFF, Version 3.8.2)
     TILE* TILE      r--   Tile image with a texture
      TIM* TIM       r--   PSX TIM
      TTC* TTF       r--   TrueType font collection (Freetype 2.3.4)
      TTF* TTF       r--   TrueType font (Freetype 2.3.4)
      TXT* TXT       rw+   Text
      UIL* UIL       -w-   X-Motif UIL table
     UYVY* UYVY      rw-   16bit/pixel interleaved YUV
      VDA* TGA       rw+   Truevision Targa image
    VICAR* VICAR     rw-   VICAR rasterfile format
      VID* VID       rw+   Visual Image Directory
     VIFF* VIFF      rw+   Khoros Visualization image
      VST* TGA       rw+   Truevision Targa image
     WBMP* WBMP      rw-   Wireless Bitmap (level 0) image
      WMF* WMF       ---   Windows Meta File
      WMZ* WMZ       ---   Compressed Windows Meta File
      WPG* WPG       r--   Word Perfect Graphics
        X* X         rw+   X Image
      XBM* XBM       rw-   X Windows system bitmap (black and white)
       XC* XC        r--   Constant image uniform color
      XCF* XCF       r--   GIMP image
      XPM* XPM       rw-   X Windows system pixmap (color)
       XV* VIFF      rw+   Khoros Visualization image
      XWD* XWD       rw-   X Windows system window dump (color)
        Y* RAW       rw+   Raw yellow samples
    YCbCr* YCbCr     rw+   Raw Y, Cb, and Cr samples
   YCbCrA* YCbCr     rw+   Raw Y, Cb, Cr, and opacity samples
      YUV* YUV       rw-   CCIR 601 4:1:1 or 4:2:2

* native blob support

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: (Gallery2) Composite fails test -- OS X 10.4.9

Post by anthony »

Are you sure that file is JPEG? check it directly with verious tools, and try it with IM "display" to see if IM can really read it.

Do you have two IM's installed? or two IM libraries?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
wlbentley

Re: (Gallery2) Composite fails test -- OS X 10.4.9

Post by wlbentley »

Hi again,

Thanks for following up with this.
Are you sure that file is JPEG? check it directly with various tools, and try it with IM "display" to see if IM can really read it.
I tried opening test.jpg with GraphicConverter, and it opens fine. It's JPEG, and displays correctly. J2 is JPEG 2000 and displays correctly.

However, I tried viewing it with the ImageMagick 'display' command in X11 Terminal, and I am getting two errors:

Code: Select all

unable to open module file '/usr/local/lib/ImageMagick-6.3.2/modules-Q16/coders/jpeg.la': No such file or directory:
(It's right. There's no such file there! What do I have to do to get this file?)

Code: Select all

no decode delegate for this image format '/Library/WebServer/Documents/gallery2/modules/imagemagick/data/test.jpg'
Do you have two IM's installed? or two IM libraries?
Don't think so. I can only 'locate' one instance of conjure, for example.

Looks like the missing jpeg.la file may be the problem, don't you think?

Thanks again.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: (Gallery2) Composite fails test -- OS X 10.4.9

Post by anthony »

There are two causes for this..

One, your IM is miss installed (prehap it was installed into /usr/lib, rather than /usr/local?)

OR more likely your IM is not handling JPEG2000 which requires a very different library to the normal older jpeg library!

For exampel you don't have JP2 in your list of file formats. As such that is probably the problem.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
wlbentley

Re: (Gallery2) Composite fails test -- OS X 10.4.9

Post by wlbentley »

The file "jpeg.la" is just missing. Here is a partial listing from its directory:

Code: Select all

/usr/local/lib/ImageMagick-6.3.2/modules-Q16/coders]$ ls
total 18688
[snip...]
-rw-r--r--   1 root  wheel   27336 May 31 20:01 histogram.a
-rwxr-xr-x   1 root  wheel     937 May 31 20:01 histogram.la*
-rwxr-xr-x   1 root  wheel   33288 May 31 20:01 histogram.so*
-rw-r--r--   1 root  wheel   28392 May 31 20:01 html.a
-rwxr-xr-x   1 root  wheel     902 May 31 20:01 html.la*
-rwxr-xr-x   1 root  wheel   33036 May 31 20:01 html.so*
-rw-r--r--   1 root  wheel   49360 May 31 20:01 icon.a
-rwxr-xr-x   1 root  wheel     902 May 31 20:01 icon.la*
-rwxr-xr-x   1 root  wheel   51324 May 31 20:01 icon.so*
-rw-r--r--   1 root  wheel   21072 May 31 20:01 info.a
-rwxr-xr-x   1 root  wheel     902 May 31 20:01 info.la*
-rwxr-xr-x   1 root  wheel   26392 May 31 20:01 info.so*
-rw-r--r--   1 root  wheel   28128 May 31 20:01 label.a
-rwxr-xr-x   1 root  wheel     909 May 31 20:01 label.la*
-rwxr-xr-x   1 root  wheel   35620 May 31 20:01 label.so*
-rw-r--r--   1 root  wheel  132352 May 31 20:01 magick.a
-rwxr-xr-x   1 root  wheel     916 May 31 20:01 magick.la*
-rwxr-xr-x   1 root  wheel  135044 May 31 20:01 magick.so*
[snip...]
As you can see, there's no JPEG or JPEG 2000 at all.

So, yes, I think something is wrong. But three different installations (binary, source, MacPorts) seem to have had the same result.

Any thoughts how to remedy this? Judging from the number of views on this topic, I'm not the only one experiencing it. I'm sure if we can resolve this, it will be helpful to others as well.

Thanks again for your help.
wlbentley

Re: (Gallery2) Composite fails test -- OS X 10.4.9

Post by wlbentley »

Does that mean that the default configuration for ImageMagick does not include support for JPEG?
wlbentley

Re: (Gallery2) Composite fails test -- OS X 10.4.9 (Solved)

Post by wlbentley »

When I configured ImageMagick using source files, I didn't notice that it was in fact installing to /opt/local/bin... etc. For some reason my 'locate' command didn't find the binaries placed there. But when I dug deeper into the configure file, I noticed the difference.

Entering /opt/local/bin/ as the location for the ImageMagick binaries in Gallery2, enabled all tests to pass.

My bad... sort of. The first install (from the .dmg installer) put the files in /usr/local/bin/. Not sure whether both MacPort and the source files put their results into /opt/local/bin/, and at this point I don't really care. It's apparently working.

Hope this saves time for someone.

And thanks, anthony, for your help. It got me on the right path (so to speak).
Post Reply