+ static void CleanUpHandlers();
+
+ /**
+ Finds the handler with the given name.
+
+ @param name
+ The handler name.
+
+ @return A pointer to the handler if found, @NULL otherwise.
+
+ @see wxImageHandler
+ */
+ static wxImageHandler* FindHandler(const wxString& name);
+
+ /**
+ Finds the handler associated with the given extension and type.
+
+ @param extension
+ The file extension, such as "bmp".
+ @param imageType
+ The image type; one of the ::wxBitmapType values.
+
+ @return A pointer to the handler if found, @NULL otherwise.
+
+ @see wxImageHandler
+ */
+ static wxImageHandler* FindHandler(const wxString& extension,
+ wxBitmapType imageType);
+
+ /**
+ Finds the handler associated with the given image type.
+
+ @param imageType
+ The image type; one of the ::wxBitmapType values.
+
+ @return A pointer to the handler if found, @NULL otherwise.
+
+ @see wxImageHandler
+ */
+ static wxImageHandler* FindHandler(wxBitmapType imageType);
+
+ /**
+ Finds the handler associated with the given MIME type.
+
+ @param mimetype
+ MIME type.
+
+ @return A pointer to the handler if found, @NULL otherwise.
+
+ @see wxImageHandler
+ */
+ static wxImageHandler* FindHandlerMime(const wxString& mimetype);
+
+ /**
+ Returns the static list of image format handlers.
+
+ @see wxImageHandler
+ */
+ static wxList& GetHandlers();
+
+ /**
+ Internal use only. Adds standard image format handlers.
+ It only install wxBMPHandler for the time being, which is used by wxBitmap.
+
+ This function is called by wxWidgets on startup, and shouldn't be called by
+ the user.
+
+ @see wxImageHandler, wxInitAllImageHandlers(), wxQuantize
+ */
+ static void InitStandardHandlers();
+
+ /**
+ Adds a handler at the start of the static list of format handlers.
+
+ @param handler
+ A new image format handler object. There is usually only one instance
+ of a given handler class in an application session.
+
+ @see wxImageHandler
+ */
+ static void InsertHandler(wxImageHandler* handler);
+
+ /**
+ Finds the handler with the given name, and removes it.
+ The handler is not deleted.
+
+ @param name
+ The handler name.
+
+ @return @true if the handler was found and removed, @false otherwise.
+
+ @see wxImageHandler
+ */
+ static bool RemoveHandler(const wxString& name);
+
+ //@}
+
+
+ /**
+ Returns @true if at least one of the available image handlers can read
+ the file with the given name.
+
+ See wxImageHandler::CanRead for more info.
+ */
+ static bool CanRead(const wxString& filename);
+
+ /**
+ Returns @true if at least one of the available image handlers can read
+ the data in the given stream.
+
+ See wxImageHandler::CanRead for more info.
+ */
+ static bool CanRead(wxInputStream& stream);
+
+ //@{
+ /**
+ 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.
+
+ For the overload taking the parameter @a filename, that's the name
+ of the file to query.
+ For the overload taking the parameter @a stream, that's the opened input
+ stream with image data.
+
+ See wxImageHandler::GetImageCount() for more info.
+
+ The parameter @a type may be one of the following values:
+ @li wxBITMAP_TYPE_BMP: Load a Windows bitmap file.
+ @li wxBITMAP_TYPE_GIF: Load a GIF bitmap file.
+ @li wxBITMAP_TYPE_JPEG: Load a JPEG bitmap file.
+ @li wxBITMAP_TYPE_PNG: Load a PNG bitmap file.
+ @li wxBITMAP_TYPE_PCX: Load a PCX bitmap file.
+ @li wxBITMAP_TYPE_PNM: Load a PNM bitmap file.
+ @li wxBITMAP_TYPE_TIF: Load a TIFF bitmap file.
+ @li wxBITMAP_TYPE_TGA: Load a TGA bitmap file.
+ @li wxBITMAP_TYPE_XPM: Load a XPM bitmap file.
+ @li wxBITMAP_TYPE_ICO: Load a Windows icon file (ICO).
+ @li wxBITMAP_TYPE_CUR: Load a Windows cursor file (CUR).
+ @li wxBITMAP_TYPE_ANI: Load a Windows animated cursor file (ANI).
+ @li wxBITMAP_TYPE_ANY: Will try to autodetect the format.
+
+ @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).
+ */
+ static int GetImageCount(const wxString& filename,
+ wxBitmapType type = wxBITMAP_TYPE_ANY);
+ static int GetImageCount(wxInputStream& stream,
+ wxBitmapType type = wxBITMAP_TYPE_ANY);
+ //@}
+
+ /**
+ Iterates all registered wxImageHandler objects, and returns a string containing
+ file extension masks suitable for passing to file open/save dialog boxes.
+
+ @return The format of the returned string is @c "(*.ext1;*.ext2)|*.ext1;*.ext2".
+ It is usually a good idea to prepend a description before passing
+ the result to the dialog.
+ Example:
+ @code
+ wxFileDialog FileDlg( this, "Choose Image", ::wxGetCwd(), "",
+ _("Image Files ") + wxImage::GetImageExtWildcard(),
+ wxFD_OPEN );
+ @endcode
+
+ @see wxImageHandler
+ */
+ static wxString GetImageExtWildcard();
+
+ /**
+ Converts a color in RGB color space to HSV color space.
+ */
+ static wxImage::HSVValue RGBtoHSV(const wxImage::RGBValue& rgb);
+
+ /**
+ Converts a color in HSV color space to RGB color space.
+ */
+ static wxImage::RGBValue HSVtoRGB(const wxImage::HSVValue& hsv);