webCOMAND

#IMAGE Color

Fill an image area with a color.

Only supported by ImageMagick image processing engine.

Prototype

#IMAGE($image_bytes, Color, $method, $color, $x = 0, $y = 0, $border_color = NULL)

Parameters

x and y parameters do not have an effect in PHP's ImageMagick implementation.
  • method - One of the following options.
    • Point - set the color of a single pixel at Point
    • Replace - Set the color of all pixels whose color matches the color at Point.
    • Floodfill - Fill area of same color pixels connected to Point.  If the pixel at Point is transparent, nothing will be updated.
    • FillToBorder - Like Floodfill, except you specify the color which borders the area to be filled, rather that the color to be replaced by the fill process.
    • Reset - Set all pixels in image to color (x and y are irrelevant).
  • color - Color to fill with, according to the specified method.
  • x - Horizontal offset in pixels from the left edge to start text.
  • y - Vertical offset in pixels from the top edge to start text.
  • border_color - Color of border to fill to (only used by FillToBorder method).

Point Example

#/ fill the area starting at 80, 100 with red pixels
#NEW($img)#IMAGE($img,Color,FloodFill,red,80,100)#ENDNEW