Hi I need help. Total Newbie.

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
DianaSg

Hi I need help. Total Newbie.

Post 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.
DianaSg

Re: Hi I need help. Total Newbie.

Post by DianaSg »

Btw, I am running x86_64 and PHP Version 5.1.6 and does not have php src directory.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Hi I need help. Total Newbie.

Post 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)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
DianaSg

Re: Hi I need help. Total Newbie.

Post 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.
DianaSg

Re: Hi I need help. Total Newbie.

Post 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??
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Hi I need help. Total Newbie.

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply