MagickWand For PHP



MagickOrderedPosterizeImage -- add a noise pattern to the image with specific amplitudes


bool MagickOrderedPosterizeImage( MagickWand mgck_wnd, string threshold_map [, int channel_type] )

MagickOrderedPosterizeImage() performs an ordered dither based on a number of pre-defined dithering threshold maps, but over multiple intensity levels, which can be different for different channels, according to the input arguments. The map string contains the name of the threshold dither map to use, followed by zero or more numbers representing the number of color levels tho dither between. Any level number less than 2 is equivelent to 2, and means only binary dithering will be applied to each color channel. No numbers also means a 2 level (bitmap) dither will be applied to all hile a single number is the number of levels applied to each channel in sequence. More numbers will be applied in turn to each of the color channels. For example: "o3x3,6" generates a 6 level posterization of the image with a ordered 3x3 diffused pixel dither being applied between each level. While checker,8,8,4 will produce a 332 colormaped image with only a single checkerboard hash pattern (50% grey) between each color level, to basically double the number of color levels with a bare minimim of dithering. Returns TRUE if successful, FALSE if an error occurred. If the optional channel_type parameter is specified, MagickOrderedPosterizeImageChannel() is called on that particular image channel / pixel component. channel_type must be a ChannelType constant, one of the following: MW_RedChannel MW_CyanChannel MW_GreenChannel MW_MagentaChannel MW_BlueChannel MW_YellowChannel MW_AlphaChannel MW_OpacityChannel MW_BlackChannel MW_IndexChannel MW_AllChannels

A description of each parameter follows:

mgck_wnd A MagickWand resource
threshold The desired threshold value
channel_type (OPTIONAL) ChannelType constant

Up Next