<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxImage</title>
</header>
<module>wxImage</module>
<modulesummary>Functions for wxImage class</modulesummary>
<description><p>This class encapsulates a platform-independent image.
      </p><p>An image can be created from data, or using <seemfa marker="wxBitmap#convertToImage/1"><c>wxBitmap:convertToImage/1</c></seemfa>. An image can be loaded from a file in a variety of formats, and is extensible to new formats via image format handlers. Functions are available to set and get image bits, so it can be used for basic image manipulation.
      </p><p>A <seeerl marker="wxImage"><c>wxImage</c></seeerl> cannot (currently) be drawn directly to a <seeerl marker="wxDC"><c>wxDC</c></seeerl>. Instead, a platform-specific <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl> object must be created from it using the wxBitmap::wxBitmap(wxImage,int depth) constructor. This bitmap can then be drawn in a device context, using <seemfa marker="wxDC#drawBitmap/4"><c>wxDC:drawBitmap/4</c></seemfa>.
      </p><p>More on the difference between <seeerl marker="wxImage"><c>wxImage</c></seeerl> and <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl>: <seeerl marker="wxImage"><c>wxImage</c></seeerl> is just a buffer of RGB bytes with an optional buffer for the alpha bytes. It is all generic, platform independent and image file format independent code. It includes generic code for scaling, resizing, clipping, and other manipulations of the image data. OTOH, <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl> is intended to be a wrapper of whatever is the native image format that is quickest/easiest to draw to a DC or to be the target of the drawing operations performed on a <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl>. By splitting the responsibilities between wxImage/wxBitmap like this then it's easier to use generic code shared by all platforms and image types for generic operations and platform specific code where performance or compatibility is needed.
      </p><p>One colour value of the image may be used as a mask colour which will lead to the automatic creation of a <seeerl marker="wxMask"><c>wxMask</c></seeerl> object associated to the bitmap object.
      </p><p>Alpha channel support</p> <p>Starting from wxWidgets 2.5.0 <seeerl marker="wxImage"><c>wxImage</c></seeerl> supports alpha channel data, that is in addition to a byte for the red, green and blue colour components for each pixel it also stores a byte representing the pixel opacity.
      </p> <p>An alpha value of 0 corresponds to a transparent pixel (null opacity) while a value of 255 means that the pixel is 100% opaque. The constants ?wxIMAGE_ALPHA_TRANSPARENT and ?wxIMAGE_ALPHA_OPAQUE can be used to indicate those values in a more readable form.
      </p> <p>While all images have RGB data, not all images have an alpha channel. Before using <seemfa marker="#getAlpha/3"><c>getAlpha/3</c></seemfa> you should check if this image contains an alpha channel with <seemfa marker="#hasAlpha/1"><c>hasAlpha/1</c></seemfa>. Currently the BMP, PNG, TGA, and TIFF format handlers have full alpha channel support for loading so if you want to use alpha you have to use one of these formats. If you initialize the image alpha channel yourself using <seemfa marker="#setAlpha/4"><c>setAlpha/4</c></seemfa>, you should save it in either PNG, TGA, or TIFF format to avoid losing it as these are the only handlers that currently support saving with alpha.
      </p><p>Available image handlers</p> <p>The following image handlers are available. wxBMPHandler is always installed by default. To use other image formats, install the appropriate handler with <c>wxImage::AddHandler</c> (not implemented in wx) or call ?wxInitAllImageHandlers().
      </p> <p>When saving in PCX format, <c>wxPCXHandler</c> (not implemented in wx) will count the number of different colours in the image; if there are 256 or less colours, it will save as 8 bit, else it will save as 24 bit.
      </p><p>Loading PNMs only works for ASCII or raw RGB images. When saving in PNM format, <c>wxPNMHandler</c> (not implemented in wx) will always save as raw RGB.
      </p><p>Saving GIFs requires images of maximum 8 bpp (see <c>wxQuantize</c> (not implemented in wx)), and the alpha channel converted to a mask (see <seemfa marker="#convertAlphaToMask/5"><c>convertAlphaToMask/5</c></seemfa>). Saving an animated GIF requires images of the same size (see <c>wxGIFHandler::SaveAnimation</c> (not implemented in wx))
      </p><p>Predefined objects (include wx.hrl): ?wxNullImage
      </p><p>See: <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl>, ?wxInitAllImageHandlers(), <c>wxPixelData</c> (not implemented in wx)
      </p>
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_image.html">wxImage</url></p>
  </description>
<datatypes><datatype><name name="wxImage"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Creates an empty <c>wxImage</c> object without an alpha channel. </fsummary>
    <desc><p>Creates an empty <seeerl marker="wxImage"><c>wxImage</c></seeerl> object without an alpha channel. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
  
    <name name="new" arity="1" clause_i="2" since=""/>
    <fsummary>See: <c>new/2</c></fsummary>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
  
    <name name="new" arity="2" clause_i="2" since=""/>
  
    <name name="new" arity="2" clause_i="3" since=""/>
  
    <name name="new" arity="2" clause_i="4" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="3" clause_i="1" since=""/>
  
    <name name="new" arity="3" clause_i="2" since=""/>
  
    <name name="new" arity="3" clause_i="3" since=""/>
  
    <name name="new" arity="3" clause_i="4" since=""/>
  
    <name name="new" arity="3" clause_i="5" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="4" clause_i="1" since=""/>
  
    <name name="new" arity="4" clause_i="2" since=""/>
  
    <name name="new" arity="4" clause_i="3" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="5" clause_i="1" since=""/>
    <fsummary>Creates an image from data in memory. </fsummary>
    <desc><p>Creates an image from data in memory. 
      </p><p>If <c>static_data</c> is false then the <seeerl marker="wxImage"><c>wxImage</c></seeerl> will take ownership of the data and free it afterwards. For this, it has to be allocated with <c>malloc</c>.
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor. </fsummary>
    <desc><p>Destructor. 
      </p><p>See reference-counted object destruction for more info. 
      </p></desc>
  </func>
  
  <func>
    <name name="blur" arity="2" clause_i="1" since=""/>
    <fsummary>Blurs the image in both horizontal and vertical directions by the specified pixel <c>blurRadius</c>. </fsummary>
    <desc><p>Blurs the image in both horizontal and vertical directions by the specified pixel <c>blurRadius</c>. 
      </p><p>This should not be used when using a single mask colour for transparency.
      </p><p>See: <seemfa marker="#blurHorizontal/2"><c>blurHorizontal/2</c></seemfa>, <seemfa marker="#blurVertical/2"><c>blurVertical/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="blurHorizontal" arity="2" clause_i="1" since=""/>
    <fsummary>Blurs the image in the horizontal direction only. </fsummary>
    <desc><p>Blurs the image in the horizontal direction only. 
      </p><p>This should not be used when using a single mask colour for transparency.
      </p><p>See: <seemfa marker="#blur/2"><c>blur/2</c></seemfa>, <seemfa marker="#blurVertical/2"><c>blurVertical/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="blurVertical" arity="2" clause_i="1" since=""/>
    <fsummary>Blurs the image in the vertical direction only. </fsummary>
    <desc><p>Blurs the image in the vertical direction only. 
      </p><p>This should not be used when using a single mask colour for transparency.
      </p><p>See: <seemfa marker="#blur/2"><c>blur/2</c></seemfa>, <seemfa marker="#blurHorizontal/2"><c>blurHorizontal/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="convertAlphaToMask" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>convertAlphaToMask/2</c></fsummary>
  </func>
  
  <func>
    <name name="convertAlphaToMask" arity="2" clause_i="1" since=""/>
    <fsummary>If the image has alpha channel, this method converts it to mask. </fsummary>
    <desc><p>If the image has alpha channel, this method converts it to mask. 
      </p><p>If the image has an alpha channel, all pixels with alpha value less than <c>threshold</c> are replaced with the mask colour and the alpha channel is removed. Otherwise nothing is done.
      </p><p>The mask colour is chosen automatically using <seemfa marker="#findFirstUnusedColour/2"><c>findFirstUnusedColour/2</c></seemfa>, see the overload below if this is not appropriate.
      </p><p>Return: Returns true on success, false on error. 
      </p></desc>
  </func>
  
  <func>
    <name name="convertAlphaToMask" arity="4" clause_i="1" since=""/>
    <fsummary>See: <c>convertAlphaToMask/5</c></fsummary>
  </func>
  
  <func>
    <name name="convertAlphaToMask" arity="5" clause_i="1" since=""/>
    <fsummary>If the image has alpha channel, this method converts it to mask using the specified colour as the mask colour. </fsummary>
    <desc><p>If the image has alpha channel, this method converts it to mask using the specified colour as the mask colour. 
      </p><p>If the image has an alpha channel, all pixels with alpha value less than <c>threshold</c> are replaced with the mask colour and the alpha channel is removed. Otherwise nothing is done.
      </p><p>Since: 2.9.0
      </p><p>Return: Returns true on success, false on error. 
      </p></desc>
  </func>
  
  <func>
    <name name="convertToGreyscale" arity="1" clause_i="1" since=""/>
    <fsummary>Returns a greyscale version of the image. </fsummary>
    <desc><p>Returns a greyscale version of the image. 
      </p><p>Since: 2.9.0 
      </p></desc>
  </func>
  
  <func>
    <name name="convertToGreyscale" arity="4" clause_i="1" since=""/>
    <fsummary>Returns a greyscale version of the image. </fsummary>
    <desc><p>Returns a greyscale version of the image. 
      </p><p>The returned image uses the luminance component of the original to calculate the greyscale. Defaults to using the standard ITU-T BT.601 when converting to YUV, where every pixel equals (R * <c>weight_r</c>) + (G * <c>weight_g</c>) + (B * <c>weight_b</c>). 
      </p></desc>
  </func>
  
  <func>
    <name name="convertToMono" arity="4" clause_i="1" since=""/>
    <fsummary>Returns monochromatic version of the image. </fsummary>
    <desc><p>Returns monochromatic version of the image. 
      </p><p>The returned image has white colour where the original has (r,g,b) colour and black colour everywhere else. 
      </p></desc>
  </func>
  
  <func>
    <name name="copy" arity="1" clause_i="1" since=""/>
    <fsummary>Returns an identical copy of this image. </fsummary>
    <desc><p>Returns an identical copy of this image. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>create/3</c></fsummary>
  </func>
  
  <func>
    <name name="create" arity="3" clause_i="1" since=""/>
  
    <name name="create" arity="3" clause_i="2" since=""/>
  
    <name name="create" arity="3" clause_i="3" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="4" clause_i="1" since=""/>
  
    <name name="create" arity="4" clause_i="2" since=""/>
  
    <name name="create" arity="4" clause_i="3" since=""/>
  
    <name name="create" arity="4" clause_i="4" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="5" clause_i="1" since=""/>
  
    <name name="create" arity="5" clause_i="2" since=""/>
  
    <name name="create" arity="5" clause_i="3" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="6" clause_i="1" since=""/>
    <fsummary>Creates a fresh image. </fsummary>
    <desc><p>Creates a fresh image. 
      </p><p>See <seemfa marker="#new/5"><c>new/5</c></seemfa> for more info.
      </p><p>Return: true if the call succeeded, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="'Destroy'" arity="1" clause_i="1" since=""/>
    <fsummary>Destroys the image data. </fsummary>
    <desc><p>Destroys the image data. 
      </p></desc>
  </func>
  
  <func>
    <name name="findFirstUnusedColour" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>findFirstUnusedColour/2</c></fsummary>
  </func>
  
  <func>
    <name name="findFirstUnusedColour" arity="2" clause_i="1" since=""/>
    <fsummary>Finds the first colour that is never used in the image. </fsummary>
    <desc><p>Finds the first colour that is never used in the image. 
      </p><p>The search begins at given initial colour and continues by increasing R, G and B components (in this order) by 1 until an unused colour is found or the colour space exhausted.
      </p><p>The parameters <c>r</c>, <c>g</c>, <c>b</c> are pointers to variables to save the colour.
      </p><p>The parameters <c>startR</c>, <c>startG</c>, <c>startB</c> define the initial values of the colour. The returned colour will have RGB values equal to or greater than these.
      </p><p>Return: Returns false if there is no unused colour left, true on success.
      </p><p>Note: This method involves computing the histogram, which is a computationally intensive operation. 
      </p></desc>
  </func>
  
  <func>
    <name name="getImageExtWildcard" arity="0" clause_i="1" since=""/>
    <fsummary>Iterates all registered <c>wxImageHandler</c> (not implemented in wx) objects, and returns a string containing file extension masks suitable for passing to file open/save dialog boxes. </fsummary>
    <desc><p>Iterates all registered <c>wxImageHandler</c> (not implemented in wx) objects, and returns a string containing file extension masks suitable for passing to file open/save dialog boxes. 
      </p><p>Return: The format of the returned string is <c>"(*.ext1;*.ext2)|*.ext1;*.ext2"</c>. It is usually a good idea to prepend a description before passing the result to the dialog. Example: 
      </p><p>See: <c>wxImageHandler</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="getAlpha" arity="1" clause_i="1" since=""/>
    <fsummary>Returns pointer to the array storing the alpha values for this image. </fsummary>
    <desc><p>Returns pointer to the array storing the alpha values for this image. 
      </p><p>This pointer is NULL for the images without the alpha channel. If the image does have it, this pointer may be used to directly manipulate the alpha values which are stored as the RGB ones. 
      </p></desc>
  </func>
  
  <func>
    <name name="getAlpha" arity="3" clause_i="1" since=""/>
    <fsummary>Return alpha value at given pixel location. </fsummary>
    <desc><p>Return alpha value at given pixel location. 
      </p></desc>
  </func>
  
  <func>
    <name name="getBlue" arity="3" clause_i="1" since=""/>
    <fsummary>Returns the blue intensity at the given coordinate. </fsummary>
    <desc><p>Returns the blue intensity at the given coordinate. 
      </p></desc>
  </func>
  
  <func>
    <name name="getData" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the image data as an array. </fsummary>
    <desc><p>Returns the image data as an array. 
      </p><p>This is most often used when doing direct image manipulation. The return value points to an array of characters in RGBRGBRGB... format in the top-to-bottom, left-to-right order, that is the first RGB triplet corresponds to the first pixel of the first row, the second one - to the second pixel of the first row and so on until the end of the first row, with second row following after it and so on.
      </p><p>You should not delete the returned pointer nor pass it to <seemfa marker="#setData/5"><c>setData/5</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="getGreen" arity="3" clause_i="1" since=""/>
    <fsummary>Returns the green intensity at the given coordinate. </fsummary>
    <desc><p>Returns the green intensity at the given coordinate. 
      </p></desc>
  </func>
  
  <func>
    <name name="getImageCount" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>getImageCount/2</c></fsummary>
  </func>
  
  <func>
    <name name="getImageCount" arity="2" clause_i="1" since=""/>
    <fsummary>If the image file contains more than one image and the image handler is capable of retrieving these individually, this function will return the number of available images. </fsummary>
    <desc><p>If the image file contains more than one image and the image handler is capable of retrieving these individually, this function will return the number of available images. 
      </p><p>For the overload taking the parameter <c>filename</c>, that's the name of the file to query. For the overload taking the parameter <c>stream</c>, that's the opened input stream with image data.
      </p><p>See <c>wxImageHandler::GetImageCount()</c> (not implemented in wx) for more info.
      </p><p>The parameter <c>type</c> may be one of the following values: 
      </p><p>Return: Number of available images. For most image handlers, this is 1 (exceptions are TIFF and ICO formats as well as animated GIFs for which this function returns the number of frames in the animation). 
      </p></desc>
  </func>
  
  <func>
    <name name="getHeight" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the height of the image in pixels. </fsummary>
    <desc><p>Gets the height of the image in pixels. 
      </p><p>See: <seemfa marker="#getWidth/1"><c>getWidth/1</c></seemfa>, <c>GetSize()</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="getMaskBlue" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the blue value of the mask colour. </fsummary>
    <desc><p>Gets the blue value of the mask colour. 
      </p></desc>
  </func>
  
  <func>
    <name name="getMaskGreen" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the green value of the mask colour. </fsummary>
    <desc><p>Gets the green value of the mask colour. 
      </p></desc>
  </func>
  
  <func>
    <name name="getMaskRed" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the red value of the mask colour. </fsummary>
    <desc><p>Gets the red value of the mask colour. 
      </p></desc>
  </func>
  
  <func>
    <name name="getOrFindMaskColour" arity="1" clause_i="1" since=""/>
    <fsummary>Get the current mask colour or find a suitable unused colour that could be used as a mask colour. </fsummary>
    <desc><p>Get the current mask colour or find a suitable unused colour that could be used as a mask colour. 
      </p><p>Returns true if the image currently has a mask. 
      </p></desc>
  </func>
  
  <func>
    <name name="getPalette" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the palette associated with the image. </fsummary>
    <desc><p>Returns the palette associated with the image. 
      </p><p>Currently the palette is only used when converting to <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl> under Windows.
      </p><p>Some of the <seeerl marker="wxImage"><c>wxImage</c></seeerl> handlers have been modified to set the palette if one exists in the image file (usually 256 or less colour images in GIF or PNG format). 
      </p></desc>
  </func>
  
  <func>
    <name name="getRed" arity="3" clause_i="1" since=""/>
    <fsummary>Returns the red intensity at the given coordinate. </fsummary>
    <desc><p>Returns the red intensity at the given coordinate. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSubImage" arity="2" clause_i="1" since=""/>
    <fsummary>Returns a sub image of the current one as long as the rect belongs entirely to the image. </fsummary>
    <desc><p>Returns a sub image of the current one as long as the rect belongs entirely to the image. 
      </p></desc>
  </func>
  
  <func>
    <name name="getWidth" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the width of the image in pixels. </fsummary>
    <desc><p>Gets the width of the image in pixels. 
      </p><p>See: <seemfa marker="#getHeight/1"><c>getHeight/1</c></seemfa>, <c>GetSize()</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="hasAlpha" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if this image has alpha channel, false otherwise. </fsummary>
    <desc><p>Returns true if this image has alpha channel, false otherwise. 
      </p><p>See: <seemfa marker="#getAlpha/3"><c>getAlpha/3</c></seemfa>, <seemfa marker="#setAlpha/4"><c>setAlpha/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="hasMask" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if there is a mask active, false otherwise. </fsummary>
    <desc><p>Returns true if there is a mask active, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="getOption" arity="2" clause_i="1" since=""/>
    <fsummary>Gets a user-defined string-valued option. </fsummary>
    <desc><p>Gets a user-defined string-valued option. 
      </p><p>Generic options: 
      </p><p> Options specific to <c>wxGIFHandler</c> (not implemented in wx): 
      </p><p>Return: The value of the option or an empty string if not found. Use <seemfa marker="#hasOption/2"><c>hasOption/2</c></seemfa> if an empty string can be a valid option value.
      </p><p>See: <seemfa marker="#setOption/3"><c>setOption/3</c></seemfa>, <seemfa marker="#getOptionInt/2"><c>getOptionInt/2</c></seemfa>, <seemfa marker="#hasOption/2"><c>hasOption/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getOptionInt" arity="2" clause_i="1" since=""/>
    <fsummary>Gets a user-defined integer-valued option. </fsummary>
    <desc><p>Gets a user-defined integer-valued option. 
      </p><p>The function is case-insensitive to <c>name</c>. If the given option is not present, the function returns 0. Use <seemfa marker="#hasOption/2"><c>hasOption/2</c></seemfa> if 0 is a possibly valid value for the option.
      </p><p>Generic options: 
      </p><p>Since: 2.9.3
      </p><p> Options specific to <c>wxPNGHandler</c> (not implemented in wx): 
      </p><p> Options specific to <c>wxTIFFHandler</c> (not implemented in wx): 
      </p><p> Options specific to <c>wxGIFHandler</c> (not implemented in wx): 
      </p><p>Note: Be careful when combining the options <c>wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL</c>, <c>wxIMAGE_OPTION_TIFF_BITSPERSAMPLE</c>, and <c>wxIMAGE_OPTION_TIFF_PHOTOMETRIC</c>. While some measures are taken to prevent illegal combinations and/or values, it is still easy to abuse them and come up with invalid results in the form of either corrupted images or crashes.
      </p><p>Return: The value of the option or 0 if not found. Use <seemfa marker="#hasOption/2"><c>hasOption/2</c></seemfa> if 0 can be a valid option value.
      </p><p>See: <seemfa marker="#setOption/3"><c>setOption/3</c></seemfa>, <seemfa marker="#getOption/2"><c>getOption/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="hasOption" arity="2" clause_i="1" since=""/>
    <fsummary>Returns true if the given option is present. </fsummary>
    <desc><p>Returns true if the given option is present. 
      </p><p>The function is case-insensitive to <c>name</c>.
      </p><p>The lists of the currently supported options are in <seemfa marker="#getOption/2"><c>getOption/2</c></seemfa> and <seemfa marker="#getOptionInt/2"><c>getOptionInt/2</c></seemfa> function docs.
      </p><p>See: <seemfa marker="#setOption/3"><c>setOption/3</c></seemfa>, <seemfa marker="#getOption/2"><c>getOption/2</c></seemfa>, <seemfa marker="#getOptionInt/2"><c>getOptionInt/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="initAlpha" arity="1" clause_i="1" since=""/>
    <fsummary>Initializes the image alpha channel data. </fsummary>
    <desc><p>Initializes the image alpha channel data. 
      </p><p>It is an error to call it if the image already has alpha data. If it doesn't, alpha data will be by default initialized to all pixels being fully opaque. But if the image has a mask colour, all mask pixels will be completely transparent. 
      </p></desc>
  </func>
  
  <func>
    <name name="initStandardHandlers" arity="0" clause_i="1" since=""/>
    <fsummary>Internal use only. </fsummary>
    <desc><p>Internal use only. 
      </p><p>Adds standard image format handlers. It only install wxBMPHandler for the time being, which is used by <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl>.
      </p><p>This function is called by wxWidgets on startup, and shouldn't be called by the user.
      </p><p>See: <c>wxImageHandler</c> (not implemented in wx), ?wxInitAllImageHandlers(), <c>wxQuantize</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="isTransparent" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>isTransparent/4</c></fsummary>
  </func>
  
  <func>
    <name name="isTransparent" arity="4" clause_i="1" since=""/>
    <fsummary>Returns true if the given pixel is transparent, i.e. either has the mask colour if this image has a mask or if this image has alpha channel and alpha value of this pixel is strictly less than <c>threshold</c>. </fsummary>
    <desc><p>Returns true if the given pixel is transparent, i.e. either has the mask colour if this image has a mask or if this image has alpha channel and alpha value of this pixel is strictly less than <c>threshold</c>. 
      </p></desc>
  </func>
  
  <func>
    <name name="loadFile" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>loadFile/3</c></fsummary>
  </func>
  
  <func>
    <name name="loadFile" arity="3" clause_i="1" since=""/>
    <fsummary>Loads an image from a file. </fsummary>
    <desc><p>Loads an image from a file. 
      </p><p>If no handler type is provided, the library will try to autodetect the format.
      </p></desc>
  </func>
  
  <func>
    <name name="loadFile" arity="4" clause_i="1" since=""/>
    <fsummary>Loads an image from a file. </fsummary>
    <desc><p>Loads an image from a file. 
      </p><p>If no handler type is provided, the library will try to autodetect the format.
      </p></desc>
  </func>
  
  <func>
    <name name="ok" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>isOk/1</c></fsummary>
    <desc><p>See: <seemfa marker="#isOk/1"><c>isOk/1</c></seemfa>.</p>
    </desc>
  </func>
  
  <func>
    <name name="isOk" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if image data is present. </fsummary>
    <desc><p>Returns true if image data is present. 
      </p></desc>
  </func>
  
  <func>
    <name name="removeHandler" arity="1" clause_i="1" since=""/>
    <fsummary>Finds the handler with the given name, and removes it. </fsummary>
    <desc><p>Finds the handler with the given name, and removes it. 
      </p><p>The handler is also deleted.
      </p><p>Return: true if the handler was found and removed, false otherwise.
      </p><p>See: <c>wxImageHandler</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="mirror" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>mirror/2</c></fsummary>
  </func>
  
  <func>
    <name name="mirror" arity="2" clause_i="1" since=""/>
    <fsummary>Returns a mirrored copy of the image. </fsummary>
    <desc><p>Returns a mirrored copy of the image. 
      </p><p>The parameter <c>horizontally</c> indicates the orientation. 
      </p></desc>
  </func>
  
  <func>
    <name name="replace" arity="7" clause_i="1" since=""/>
    <fsummary>Replaces the colour specified by <c>r1</c>,g1,b1 by the colour <c>r2</c>,g2,b2. </fsummary>
    <desc><p>Replaces the colour specified by <c>r1</c>,g1,b1 by the colour <c>r2</c>,g2,b2. 
      </p></desc>
  </func>
  
  <func>
    <name name="rescale" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>rescale/4</c></fsummary>
  </func>
  
  <func>
    <name name="rescale" arity="4" clause_i="1" since=""/>
    <fsummary>Changes the size of the image in-place by scaling it: after a call to this function,the image will have the given width and height. </fsummary>
    <desc><p>Changes the size of the image in-place by scaling it: after a call to this function,the image will have the given width and height. 
      </p><p>For a description of the <c>quality</c> parameter, see the <seemfa marker="#scale/4"><c>scale/4</c></seemfa> function. Returns the (modified) image itself.
      </p><p>See: <seemfa marker="#scale/4"><c>scale/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="resize" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>resize/4</c></fsummary>
  </func>
  
  <func>
    <name name="resize" arity="4" clause_i="1" since=""/>
    <fsummary>Changes the size of the image in-place without scaling it by adding either a border with the given colour or cropping as necessary. </fsummary>
    <desc><p>Changes the size of the image in-place without scaling it by adding either a border with the given colour or cropping as necessary. 
      </p><p>The image is pasted into a new image with the given <c>size</c> and background colour at the position <c>pos</c> relative to the upper left of the new image.
      </p><p>If <c>red</c> = green = blue = -1 then use either the current mask colour if set or find, use, and set a suitable mask colour for any newly exposed areas.
      </p><p>Return: The (modified) image itself.
      </p><p>See: <seemfa marker="#size/4"><c>size/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="rotate" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>rotate/4</c></fsummary>
  </func>
  
  <func>
    <name name="rotate" arity="4" clause_i="1" since=""/>
    <fsummary>Rotates the image about the given point, by <c>angle</c> radians. </fsummary>
    <desc><p>Rotates the image about the given point, by <c>angle</c> radians. 
      </p><p>Passing true to <c>interpolating</c> results in better image quality, but is slower.
      </p><p>If the image has a mask, then the mask colour is used for the uncovered pixels in the rotated image background. Else, black (rgb 0, 0, 0) will be used.
      </p><p>Returns the rotated image, leaving this image intact. 
      </p></desc>
  </func>
  
  <func>
    <name name="rotateHue" arity="2" clause_i="1" since=""/>
    <fsummary>Rotates the hue of each pixel in the image by <c>angle</c>, which is a double in the range of -1.0 to +1.0, where -1.0 corresponds to -360 degrees and +1.0 corresponds to +360 degrees. </fsummary>
    <desc><p>Rotates the hue of each pixel in the image by <c>angle</c>, which is a double in the range of -1.0 to +1.0, where -1.0 corresponds to -360 degrees and +1.0 corresponds to +360 degrees. 
      </p></desc>
  </func>
  
  <func>
    <name name="rotate90" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>rotate90/2</c></fsummary>
  </func>
  
  <func>
    <name name="rotate90" arity="2" clause_i="1" since=""/>
    <fsummary>Returns a copy of the image rotated 90 degrees in the direction indicated by <c>clockwise</c>. </fsummary>
    <desc><p>Returns a copy of the image rotated 90 degrees in the direction indicated by <c>clockwise</c>. 
      </p></desc>
  </func>
  
  <func>
    <name name="saveFile" arity="2" clause_i="1" since=""/>
    <fsummary>Saves an image in the named file. </fsummary>
    <desc><p>Saves an image in the named file. 
      </p><p>File type is determined from the extension of the file name. Note that this function may fail if the extension is not recognized! You can use one of the forms above to save images to files with non-standard extensions.
      </p></desc>
  </func>
  
  <func>
    <name name="saveFile" arity="3" clause_i="1" since=""/>
  
    <name name="saveFile" arity="3" clause_i="2" since=""/>
    <fsummary>Saves an image in the named file. </fsummary>
    <desc><p>Saves an image in the named file. 
      </p></desc>
  </func>
  
  <func>
    <name name="scale" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>scale/4</c></fsummary>
  </func>
  
  <func>
    <name name="scale" arity="4" clause_i="1" since=""/>
    <fsummary>Returns a scaled version of the image. </fsummary>
    <desc><p>Returns a scaled version of the image. 
      </p><p>This is also useful for scaling bitmaps in general as the only other way to scale bitmaps is to blit a <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl> into another <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl>.
      </p><p>The parameter <c>quality</c> determines what method to use for resampling the image, see wxImageResizeQuality documentation.
      </p><p>It should be noted that although using <c>wxIMAGE_QUALITY_HIGH</c> produces much nicer looking results it is a slower method. Downsampling will use the box averaging method which seems to operate very fast. If you are upsampling larger images using this method you will most likely notice that it is a bit slower and in extreme cases it will be quite substantially slower as the bicubic algorithm has to process a lot of data.
      </p><p>It should also be noted that the high quality scaling may not work as expected when using a single mask colour for transparency, as the scaling will blur the image and will therefore remove the mask partially. Using the alpha channel will work.
      </p><p>Example: 
      </p><p>See: <seemfa marker="#rescale/4"><c>rescale/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="size" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>size/4</c></fsummary>
  </func>
  
  <func>
    <name name="size" arity="4" clause_i="1" since=""/>
    <fsummary>Returns a resized version of this image without scaling it by adding either a border with the given colour or cropping as necessary. </fsummary>
    <desc><p>Returns a resized version of this image without scaling it by adding either a border with the given colour or cropping as necessary. 
      </p><p>The image is pasted into a new image with the given <c>size</c> and background colour at the position <c>pos</c> relative to the upper left of the new image.
      </p><p>If <c>red</c> = green = blue = -1 then the areas of the larger image not covered by this image are made transparent by filling them with the image mask colour (which will be allocated automatically if it isn't currently set).
      </p><p>Otherwise, the areas will be filled with the colour with the specified RGB components.
      </p><p>See: <seemfa marker="#resize/4"><c>resize/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setAlpha" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>setAlpha/3</c></fsummary>
  </func>
  
  <func>
    <name name="setAlpha" arity="3" clause_i="1" since=""/>
    <fsummary>This function is similar to <c>setData/5</c> and has similar restrictions. </fsummary>
    <desc><p>This function is similar to <seemfa marker="#setData/5"><c>setData/5</c></seemfa> and has similar restrictions. 
      </p><p>The pointer passed to it may however be NULL in which case the function will allocate the alpha array internally - this is useful to add alpha channel data to an image which doesn't have any.
      </p><p>If the pointer is not NULL, it must have one byte for each image pixel and be allocated with malloc(). <seeerl marker="wxImage"><c>wxImage</c></seeerl> takes ownership of the pointer and will free it unless <c>static_data</c> parameter is set to true - in this case the caller should do it. 
      </p></desc>
  </func>
  
  <func>
    <name name="setAlpha" arity="4" clause_i="1" since=""/>
    <fsummary>Sets the alpha value for the given pixel. </fsummary>
    <desc><p>Sets the alpha value for the given pixel. 
      </p><p>This function should only be called if the image has alpha channel data, use <seemfa marker="#hasAlpha/1"><c>hasAlpha/1</c></seemfa> to check for this. 
      </p></desc>
  </func>
  
  <func>
    <name name="setData" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>setData/3</c></fsummary>
  </func>
  
  <func>
    <name name="setData" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the image data without performing checks. </fsummary>
    <desc><p>Sets the image data without performing checks. 
      </p><p>The data given must have the size (width*height*3) or results will be unexpected. Don't use this method if you aren't sure you know what you are doing.
      </p><p>The data must have been allocated with <c>malloc()</c>, <c>NOT</c> with <c>operator</c> new.
      </p><p>If <c>static_data</c> is false, after this call the pointer to the data is owned by the <seeerl marker="wxImage"><c>wxImage</c></seeerl> object, that will be responsible for deleting it. Do not pass to this function a pointer obtained through <seemfa marker="#getData/1"><c>getData/1</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="setData" arity="4" clause_i="1" since=""/>
    <fsummary>See: <c>setData/5</c></fsummary>
  </func>
  
  <func>
    <name name="setData" arity="5" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="setMask" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>setMask/2</c></fsummary>
  </func>
  
  <func>
    <name name="setMask" arity="2" clause_i="1" since=""/>
    <fsummary>Specifies whether there is a mask or not. </fsummary>
    <desc><p>Specifies whether there is a mask or not. 
      </p><p>The area of the mask is determined by the current mask colour. 
      </p></desc>
  </func>
  
  <func>
    <name name="setMaskColour" arity="4" clause_i="1" since=""/>
    <fsummary>Sets the mask colour for this image (and tells the image to use the mask). </fsummary>
    <desc><p>Sets the mask colour for this image (and tells the image to use the mask). 
      </p></desc>
  </func>
  
  <func>
    <name name="setMaskFromImage" arity="5" clause_i="1" since=""/>
    <fsummary>Sets image's mask so that the pixels that have RGB value of mr,mg,mb in mask will be masked in the image. </fsummary>
    <desc><p>Sets image's mask so that the pixels that have RGB value of mr,mg,mb in mask will be masked in the image. 
      </p><p>This is done by first finding an unused colour in the image, setting this colour as the mask colour and then using this colour to draw all pixels in the image who corresponding pixel in mask has given RGB value.
      </p><p>The parameter <c>mask</c> is the mask image to extract mask shape from. It must have the same dimensions as the image.
      </p><p>The parameters <c>mr</c>, <c>mg</c>, <c>mb</c> are the RGB values of the pixels in mask that will be used to create the mask.
      </p><p>Return: Returns false if mask does not have same dimensions as the image or if there is no unused colour left. Returns true if the mask was successfully applied.
      </p><p>Note: Note that this method involves computing the histogram, which is a computationally intensive operation. 
      </p></desc>
  </func>
  
  <func>
    <name name="setOption" arity="3" clause_i="1" since=""/>
  
    <name name="setOption" arity="3" clause_i="2" since=""/>
    <fsummary>Sets a user-defined option. </fsummary>
    <desc><p>Sets a user-defined option. 
      </p><p>The function is case-insensitive to <c>name</c>.
      </p><p>For example, when saving as a JPEG file, the option <c>quality</c> is used, which is a number between 0 and 100 (0 is terrible, 100 is very good).
      </p><p>The lists of the currently supported options are in <seemfa marker="#getOption/2"><c>getOption/2</c></seemfa> and <seemfa marker="#getOptionInt/2"><c>getOptionInt/2</c></seemfa> function docs.
      </p><p>See: <seemfa marker="#getOption/2"><c>getOption/2</c></seemfa>, <seemfa marker="#getOptionInt/2"><c>getOptionInt/2</c></seemfa>, <seemfa marker="#hasOption/2"><c>hasOption/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setPalette" arity="2" clause_i="1" since=""/>
    <fsummary>Associates a palette with the image. </fsummary>
    <desc><p>Associates a palette with the image. 
      </p><p>The palette may be used when converting <seeerl marker="wxImage"><c>wxImage</c></seeerl> to <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl> (MSW only at present) or in file save operations (none as yet). 
      </p></desc>
  </func>
  
  <func>
    <name name="setRGB" arity="5" clause_i="1" since=""/>
    <fsummary>Sets the colour of the pixels within the given rectangle. </fsummary>
    <desc><p>Sets the colour of the pixels within the given rectangle. 
      </p><p>This routine performs bounds-checks for the coordinate so it can be considered a safe way to manipulate the data. 
      </p></desc>
  </func>
  
  <func>
    <name name="setRGB" arity="6" clause_i="1" since=""/>
    <fsummary>Set the color of the pixel at the given x and y coordinate. </fsummary>
    <desc><p>Set the color of the pixel at the given x and y coordinate. 
      </p></desc>
  </func>
  </funcs>
</erlref>
