wxImageHandler
generated from ../src/mod_gui/misc/imghand.cppwxImageHandler is the prototype for several image handlers. See wxImage, wxBMPHandler, wxGIFHandler, wxICOHandler, wxJPEGHandler, wxPCXHandler, wxPNGHandler, wxPNMHandler, wxTIFFHandler, wxXPMHandler
Constants
Properties
| Name | Type | Description |
|---|---|---|
| extension | String | Get/Set the handler extension. |
| mimeType | String | Get/Set the handler MIME type. |
| name | String | Get/Set the handler name. |
| type | Integer | Get/Set the handler type. |
Methods
getImageCount
getImageCount(Stream) : Integer
| Name | Type | Default | Description |
|---|---|---|---|
| Stream | wxInputStream | Opened input stream for reading image data. Currently, the stream must support seeking. |
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. Most imagehandlers return 1.
loadFile
loadFile(Image,
Stream,
Verbose = true,
Index = 0) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Image | wxImage | The object that gets the loaded image. | |
| Stream | wxInputStream | Opened input stream for reading image data. | |
| Verbose | Boolean | true | When true the image handler will report errors using wxLog |
| Index | Integer | 0 | The index of the image in the file (zero-based). |
Loads a image from a stream, putting the resulting data into image. If the image file contains more than one image and the image handler is capable of retrieving these individually, index indicates which image to read from the stream. Returns true when successful, false otherwise.
saveFile
saveFile(Image,
Stream,
Verbose = true) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Image | wxImage | The object that gets the loaded image. | |
| Stream | wxOutputStream | Opened output stream for writing the image data. | |
| Verbose | Boolean | true | When true the image handler will report errors using wxLog |
Saves a image in the output stream. Returns true on success, false otherwise.
© 2002 - 2007 Franky Braem.