Page 1 of 1

Hi I need help. Total Newbie.

Posted: 2007-09-27T00:11:31-07:00
by DianaSg
I am running a Fedora Core 5 and installed
ImageMagick 6.3.5-10 (installed from source) with MagickWand for PHP 1.0.5 (installed from source)
Saw the extension Magickwand at phpinfo() but it seems it is still not working.

I was told that 6.3.5-10 is for FC6 is that true?
Any kind souls can guide me on how to install both the ImageMagick and the php extension Magickwand from scratch? Prefably rpm installations of the correct version for FC5.

Re: Hi I need help. Total Newbie.

Posted: 2007-09-27T00:13:20-07:00
by DianaSg
Btw, I am running x86_64 and PHP Version 5.1.6 and does not have php src directory.

Re: Hi I need help. Total Newbie.

Posted: 2007-09-27T19:12:08-07:00
by anthony
Actually it is for all linux releases. Just the offical repositories do not update there IM release unless told it is a security issue release. Which in this case it was.


Best Idea is to make your own RPM from the .src.rpm package.

See IM Examples, API's, Building ImageMagick RPMs for linux from SRPMs
http://www.imagemagick.org/Usage/api/#building
For the steps I use to create the RPM's (without needing root)

Re: Hi I need help. Total Newbie.

Posted: 2007-09-28T02:03:06-07:00
by DianaSg
Thanks Anthony, how about "MagickWand for PHP 1.0.5", any rpm installation?

I have tried your method of installing ImageMagick, however, the installation of Magickwand for php asks me to check for IM with "Wand-config --version", it gives command not found?

Pls help. Thanks in advance.

Re: Hi I need help. Total Newbie.

Posted: 2007-09-28T03:44:53-07:00
by DianaSg
I have installed everything.
But I still have some problem.

magickwand
MagickWand Backend Library ImageMagick
MagickWand Extension Version 1.0.5
ImageMagick support enabled
ImageMagick version ImageMagick 6.3.5 09/28/07 Q16 http://www.imagemagick.org
ImageMagick QuantumRange (MaxRGB) 65535
MagickWand supported image formats A, ART, AVI, AVS, B, BMP, BMP2, BMP3, C, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DFONT, DNG, DOT, DPS, DPX, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EXR, FAX, FITS, FRACTAL, FTS, G, G3, GIF, GIF87, GRADIENT, GRAY, HISTOGRAM, HTM, HTML, ICB, ICO, ICON, INFO, IPL, K, LABEL, M, M2V, MAP, MAT, MATTE, MIFF, MONO, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NULL, O, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PEF, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PLASMA, PNM, PPM, PREVIEW, PS, PS2, PS3, PSD, PWP, R, RAF, RAS, RGB, RGBA, RGBO, RLA, RLE, SCR, SCT, SFW, SGI, SHTML, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TILE, TIM, TTC, TTF, TXT, UIL, UYVY, VDA, VICAR, VID, VIFF, VST, WBMP, WMF, WMZ, WPG, X3F, XBM, XC, XCF, XPM, XV, Y, YCbCr, YCbCrA, YUV

Problems
1. Why jpeg jpg png is not listed here?
2. Tried the following code:
<?php
$image = NewMagickWand();
if( MagickReadImage( $image, 'image.png' ) ) {
header( 'Content-Type: image/jpeg' );
MagickSetImageFormat( $image, 'JPEG' );
MagickEchoImageBlob( $image );
} else {
echo "Error in MagickReadImage()";
echo MagickGetExceptionString($image);
}
?>

It says "Error in MagickReadImage()no decode delegate for this image format `......./image.png'"
but when I change it to

<?php
$image = NewMagickWand();
if( MagickReadImage( $image, 'image.gif' ) ) {
header( 'Content-Type: image/jpeg' );
MagickSetImageFormat( $image, 'JPEG' );
MagickEchoImageBlob( $image );
} else {
echo "Error in MagickReadImage()";
echo MagickGetExceptionString($image);
}
?>

(uploaded a gif instead) it displayed a gif file instead of a jpeg??

Re: Hi I need help. Total Newbie.

Posted: 2007-09-30T18:41:19-07:00
by anthony
The PNG did not appear, so perhaps the PNG library was not available when the
Im or PHPmagick was built. I don't use PHP very much so really don't have a lot of experience with it.

JPEG and JPG should however be synonyms. On the other hand IM usualy first tries to figure out what image format it is without refering to the suffix. If that fails then the suffix is used as a hint.

Sorry I couldn't be much further help.