monochrome from jpg's

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
alan
Posts: 4
Joined: 2012-04-03T01:21:17-07:00
Authentication code: 8675308

monochrome from jpg's

Post by alan »

Is there a 'Grayscale' function within the php version of ImageMagick which does the same as the command line function:

exec("convert $image -type Grayscale $outimage ")

I have been using '$im1->imagefilter(100,0,100);' but this just desaturates the image and produces a low contrast result.

thanks alan dunn
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: monochrome from jpg's

Post by Bonzo »

Checkout colorspace

Code: Select all

-colorspace gray
Image

Out of interest I have examples of operator usage with php on my website: Operators
alan
Posts: 4
Joined: 2012-04-03T01:21:17-07:00
Authentication code: 8675308

Re: monochrome from jpg's

Post by alan »

thanks, I'll give it a go.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: monochrome from jpg's

Post by anthony »

Do you mean in MagickWand for PHP? IMagick for PHP? or Shell ImageMagick from PHP?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply