1 \section{\class{wxImage
}}\label{wximage
}
3 This class encapsulates a platform-independent image. An image can be created
4 from data, or using the constructor taking a wxBitmap object. An image
5 can be loaded from a file in a variety of formats, and is extensible to new formats
6 via image format handlers. Functions are available to set and get image bits, so
7 it can be used for basic image manipulation.
9 A wxImage cannot (currently) be drawn directly to a
\helpref{wxDC
}{wxdc
}. Instead,
10 a platform-specific
\helpref{wxBitmap
}{wxbitmap
} object must be created from it using
11 the
\helpref{ConvertToBitmap
}{wximageconverttobitmap
} function. This bitmap can then
12 be drawn in a device context, using
\helpref{wxDC::DrawBitmap
}{wxdcdrawbitmap
}.
14 One colour value of the image may be used as a mask colour which will lead to the automatic
15 creation of a
\helpref{wxMask
}{wxmask
} object associated to the bitmap object.
17 \wxheading{Derived from
}
19 \helpref{wxObject
}{wxobject
}
21 \wxheading{Include files
}
27 \helpref{wxBitmap
}{wxbitmap
}
28 \helpref{wxInitAllImageHandlers
}{wxinitallimagehandlers
}
30 \latexignore{\rtfignore{\wxheading{Members
}}}
32 \membersection{wxImage::wxImage
}\label{wximageconstr
}
34 \func{}{wxImage
}{\void}
38 \func{}{wxImage
}{\param{const wxImage\&
}{image
}}
42 \func{}{wxImage
}{\param{const wxBitmap\&
}{ bitmap
}}
44 Constructs an image from a platform-dependent bitmap. This preserves
45 mask information so that bitmaps and images can be converted back
46 and forth without loss in that respect.
48 \func{}{wxImage
}{\param{int
}{ width
},
\param{int
}{ height
}}
50 Creates an image with the given width and height.
52 \func{}{wxImage
}{\param{const wxString\&
}{name
},
\param{long
}{ type = wxBITMAP
\_TYPE\_PNG}}
54 \func{}{wxImage
}{\param{const wxString\&
}{name
},
\param{const wxString\&
}{ mimetype
}}
56 Loads an image from a file.
58 \func{}{wxImage
}{\param{wxInputStream\&
}{stream
},
\param{long
}{ type = wxBITMAP
\_TYPE\_PNG}}
60 \func{}{wxImage
}{\param{wxInputStream\&
}{stream
},
\param{const wxString\&
}{ mimetype
}}
62 Loads an image from an input stream.
64 \wxheading{Parameters
}
66 \docparam{width
}{Specifies the width of the image.
}
68 \docparam{height
}{Specifies the height of the image.
}
70 \docparam{name
}{This refers to an image filename. Its meaning is determined by the
{\it type
} parameter.
}
72 \docparam{stream
}{This refers to an input stream. Its meaning is determined by the
{\it type
} parameter. It is equal to loading from file except that you provide opened stream (file, HTTP or any other custom class).
}
74 \docparam{type
}{May be one of the following:
78 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_BMP}}}{Load a Windows bitmap file.
}
79 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_PNG}}}{Load a PNG bitmap file.
}
80 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_JPEG}}}{Load a JPEG bitmap file.
}
81 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_GIF}}}{Load a GIF bitmap file.
}
82 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_PCX}}}{Load a PCX bitmap file.
}
83 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_PNM}}}{Load a PNM bitmap file.
}
86 The validity of these flags depends on the platform and wxWindows configuration.
87 If all possible wxWindows settings are used, the loading a BMP (Windows bitmap) file,
88 a PNG (portable network graphics) file and a JPEG file is supported on all platforms that
91 \docparam{mimetype
}{MIME type string (for example 'image/jpeg')
}
93 Note : you must call wxImage::AddHandler(new wxJPEGHandler) during application
94 initialization in order to work with JPEGs.
98 \helpref{wxImage::LoadFile
}{wximageloadfile
}
100 \pythonnote{Constructors supported by wxPython are:
\par
101 \indented{2cm
}{\begin{twocollist
}
102 \twocolitem{{\bf wxImage(name, flag)
}}{Loads an image from a file
}
103 \twocolitem{{\bf wxNullImage()
}}{Create a null image (has no size or
105 \twocolitem{{\bf wxEmptyImage(width, height)
}}{Creates an empty image
107 \twocolitem{{\bf wxImageFromMime(name, mimetype
}}{Creates an image from
108 the given file of the given mimetype
}
109 \twocolitem{{\bf wxImageFromBitmap(bitmap)
}}{Creates an image from a
110 platform-dependent bitmap
}
114 \membersection{wxImage::
\destruct{wxImage
}}
116 \func{}{\destruct{wxImage
}}{\void}
120 \membersection{wxImage::AddHandler
}\label{wximageaddhandler
}
122 \func{static void
}{AddHandler
}{\param{wxImageHandler*
}{ handler
}}
124 Adds a handler to the end of the static list of format handlers.
126 \docparam{handler
}{A new image format handler object. There is usually only one instance
127 of a given handler class in an application session.
}
131 \helpref{wxImageHandler
}{wximagehandler
}
133 \pythonnote{In wxPython this static method is named
{\tt wxImage_AddHandler
}.
}
134 \membersection{wxImage::CleanUpHandlers
}
136 \func{static void
}{CleanUpHandlers
}{\void}
138 Deletes all image handlers.
140 This function is called by wxWindows on exit.
142 \membersection{wxImage::ConvertToBitmap
}\label{wximageconverttobitmap
}
144 \constfunc{wxBitmap
}{ConvertToBitmap
}{\void}
146 Converts the image to a platform-specific bitmap object. This has to be done
147 to actually display an image as you cannot draw an image directly on a window.
148 The resulting bitmap will use the colour depth of the current system which entails
149 that a colour reduction has to take place.
151 When in
8-bit mode (PseudoColour mode), the GTK port will use a
color cube created
152 on program start-up to look up colors. This ensures a very fast conversion, but
153 the image quality won't be perfect (and could be better for photo images using more
154 sophisticated dithering algorithms).
156 \membersection{wxImage::Create
}\label{wximagecreate
}
158 \func{bool
}{Create
}{\param{int
}{ width
},
\param{int
}{ height
}}
160 Creates a fresh image.
162 \wxheading{Parameters
}
164 \docparam{width
}{The width of the image in pixels.
}
166 \docparam{height
}{The height of the image in pixels.
}
168 \wxheading{Return value
}
170 TRUE if the call succeeded, FALSE otherwise.
172 \membersection{wxImage::Destroy
}\label{wximagedestroy
}
174 \func{bool
}{Destroy
}{\void}
176 Destroys the image data.
178 \membersection{wxImage::FindHandler
}
180 \func{static wxImageHandler*
}{FindHandler
}{\param{const wxString\&
}{name
}}
182 Finds the handler with the given name.
184 \func{static wxImageHandler*
}{FindHandler
}{\param{const wxString\&
}{extension
},
\param{long
}{ imageType
}}
186 Finds the handler associated with the given extension and type.
188 \func{static wxImageHandler*
}{FindHandler
}{\param{long
}{imageType
}}
190 Finds the handler associated with the given image type.
192 \func{static wxImageHandler*
}{FindHandlerMime
}{\param{const wxString\&
}{mimetype
}}
194 Finds the handler associated with the given MIME type.
196 \docparam{name
}{The handler name.
}
198 \docparam{extension
}{The file extension, such as ``bmp".
}
200 \docparam{imageType
}{The image type, such as wxBITMAP
\_TYPE\_BMP.
}
202 \docparam{mimetype
}{MIME type.
}
204 \wxheading{Return value
}
206 A pointer to the handler if found, NULL otherwise.
210 \helpref{wxImageHandler
}{wximagehandler
}
212 \membersection{wxImage::GetBlue
}\label{wximagegetblue
}
214 \constfunc{unsigned char
}{GetBlue
}{\param{int
}{ x
},
\param{int
}{ y
}}
216 Returns the blue intensity at the given coordinate.
218 \membersection{wxImage::GetData
}\label{wximagegetdata
}
220 \constfunc{unsigned char*
}{GetData
}{\void}
222 Returns the image data as an array. This is most often used when doing
223 direct image manipulation. The return value points to an array of
224 chararcters in RGBGBRGB... format.
226 \membersection{wxImage::GetGreen
}\label{wximagegetgreen
}
228 \constfunc{unsigned char
}{GetGreen
}{\param{int
}{ x
},
\param{int
}{ y
}}
230 Returns the green intensity at the given coordinate.
232 \membersection{wxImage::GetRed
}\label{wximagegetred
}
234 \constfunc{unsigned char
}{GetRed
}{\param{int
}{ x
},
\param{int
}{ y
}}
236 Returns the red intensity at the given coordinate.
238 \membersection{wxImage::GetHandlers
}
240 \func{static wxList\&
}{GetHandlers
}{\void}
242 Returns the static list of image format handlers.
246 \helpref{wxImageHandler
}{wximagehandler
}
248 \membersection{wxImage::GetHeight
}\label{wximagegetheight
}
250 \constfunc{int
}{GetHeight
}{\void}
252 Gets the height of the image in pixels.
254 \membersection{wxImage::GetMaskBlue
}\label{wximagegetmaskblue
}
256 \constfunc{unsigned char
}{GetMaskBlue
}{\void}
258 Gets the blue value of the mask colour.
260 \membersection{wxImage::GetMaskGreen
}\label{wximagegetmaskgreen
}
262 \constfunc{unsigned char
}{GetMaskGreen
}{\void}
264 Gets the green value of the mask colour.
266 \membersection{wxImage::GetMaskRed
}\label{wximagegetmaskred
}
268 \constfunc{unsigned char
}{GetMaskRed
}{\void}
270 Gets the red value of the mask colour.
272 \membersection{wxImage::GetSubImage
}\label{wximagegetsubimage
}
274 \constfunc{wxImage
}{GetSubImage
}{\param{const wxRect\&
}{ rect
}}
276 Returns a sub image of the current one as long as the rect belongs entirely to
279 \membersection{wxImage::GetWidth
}\label{wximagegetwidth
}
281 \constfunc{int
}{GetWidth
}{\void}
283 Gets the width of the image in pixels.
287 \helpref{wxImage::GetHeight
}{wximagegetheight
}
289 \membersection{wxImage::HasMask
}\label{wximagehasmask
}
291 \constfunc{bool
}{HasMask
}{\void}
293 Returns TRUE if there is a mask active, FALSE otherwise.
295 \membersection{wxImage::InitStandardHandlers
}
297 \func{static void
}{InitStandardHandlers
}{\void}
299 Internal use only. Adds standard image format handlers. It only install BMP
300 for the time being, which is use by wxBitmap.
302 This function is called by wxWindows on startup, and shouldn't be called by
307 \helpref{wxImageHandler
}{wximagehandler
}
308 \helpref{wxInitAllImageHandlers
}{wxinitallimagehandlers
}
310 \membersection{wxImage::InsertHandler
}
312 \func{static void
}{InsertHandler
}{\param{wxImageHandler*
}{ handler
}}
314 Adds a handler at the start of the static list of format handlers.
316 \docparam{handler
}{A new image format handler object. There is usually only one instance
317 of a given handler class in an application session.
}
321 \helpref{wxImageHandler
}{wximagehandler
}
323 \membersection{wxImage::LoadFile
}\label{wximageloadfile
}
325 \func{bool
}{LoadFile
}{\param{const wxString\&
}{ name
},
\param{long
}{ type = wxBITMAP
\_TYPE\_ANY}}
327 \func{bool
}{LoadFile
}{\param{const wxString\&
}{ name
},
\param{const wxString\&
}{ mimetype
}}
329 Loads an image from a file. If no handler type is provided, the library will
330 try to use wxBITMAP
\_TYPE\_BMP.
332 \func{bool
}{LoadFile
}{\param{wxInputStream\&
}{ stream
},
\param{long
}{ type
}}
334 \func{bool
}{LoadFile
}{\param{wxInputStream\&
}{ stream
},
\param{const wxString\&
}{ mimetype
}}
336 Loads an image from an input stream.
338 \wxheading{Parameters
}
340 \docparam{name
}{A filename.
341 The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
343 \docparam{stream
}{An input stream.
344 The meaning of
{\it stream
} data is determined by the
{\it type
} parameter.
}
346 \docparam{type
}{One of the following values:
350 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP}}{Load a Windows image file.
}
351 \twocolitem{{\bf wxBITMAP
\_TYPE\_GIF}}{Load a GIF image file.
}
352 \twocolitem{{\bf wxBITMAP
\_TYPE\_TIF}}{Load a TIFF image file.
}
353 \twocolitem{{\bf wxBITMAP
\_TYPE\_JPEG}}{Load a JPEG image file.
}
354 \twocolitem{{\bf wxBITMAP
\_TYPE\_PCX}}{Load a PCX image file.
}
355 \twocolitem{{\bf wxBITMAP
\_TYPE\_PNG}}{Load a PNG image file.
}
356 \twocolitem{{\bf wxBITMAP
\_TYPE\_PNM}}{Load a PNM image file.
}
359 The validity of these flags depends on the platform and wxWindows configuration.
}
361 \docparam{mimetype
}{MIME type string (for example 'image/jpeg')
}
363 \wxheading{Return value
}
365 TRUE if the operation succeeded, FALSE otherwise.
369 \helpref{wxImage::SaveFile
}{wximagesavefile
}
371 \pythonnote{In place of a single overloaded method name, wxPython
372 implements the following methods:
\par
373 \indented{2cm
}{\begin{twocollist
}
374 \twocolitem{{\bf LoadFile(filename, type)
}}{Loads an image of the given
376 \twocolitem{{\bf LoadMimeFile(filename, mimetype)
}}{Loads an image of the given
377 mimetype from a file
}
382 \membersection{wxImage::Ok
}\label{wximageok
}
384 \constfunc{bool
}{Ok
}{\void}
386 Returns TRUE if image data is present.
388 \membersection{wxImage::RemoveHandler
}
390 \func{static bool
}{RemoveHandler
}{\param{const wxString\&
}{name
}}
392 Finds the handler with the given name, and removes it. The handler
395 \docparam{name
}{The handler name.
}
397 \wxheading{Return value
}
399 TRUE if the handler was found and removed, FALSE otherwise.
403 \helpref{wxImageHandler
}{wximagehandler
}
405 \membersection{wxImage::SaveFile
}\label{wximagesavefile
}
407 \func{bool
}{SaveFile
}{\param{const wxString\&
}{name
},
\param{int
}{ type
}}
409 \func{bool
}{SaveFile
}{\param{const wxString\&
}{name
},
\param{const wxString\&
}{ mimetype
}}
411 Saves a image in the named file.
413 \func{bool
}{SaveFile
}{\param{wxOutputStream\&
}{stream
},
\param{int
}{ type
}}
415 \func{bool
}{SaveFile
}{\param{wxOutputStream\&
}{stream
},
\param{const wxString\&
}{ mimetype
}}
417 Saves a image in the given stream.
419 \wxheading{Parameters
}
421 \docparam{name
}{A filename. The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
423 \docparam{stream
}{An output stream. The meaning of
{\it stream
} is determined by the
{\it type
} parameter.
}
425 \docparam{type
}{Currently three types can be used:
429 \twocolitem{{\bf wxBITMAP
\_TYPE\_PNG}}{Save a PNG image file.
}
430 \twocolitem{{\bf wxBITMAP
\_TYPE\_JPEG}}{Save a JPEG image file.
}
431 \twocolitem{{\bf wxBITMAP
\_TYPE\_PCX}}{Save a PCX image file.
}
434 The validity of these flags depends on the platform and wxWindows configuration
435 as well as user-added handlers.
}
437 \docparam{mimetype
}{MIME type.
}
439 \wxheading{Return value
}
441 TRUE if the operation succeeded, FALSE otherwise.
445 Depending on how wxWindows has been configured, not all formats may be available.
449 \helpref{wxImage::LoadFile
}{wximageloadfile
}
451 \pythonnote{In place of a single overloaded method name, wxPython
452 implements the following methods:
\par
453 \indented{2cm
}{\begin{twocollist
}
454 \twocolitem{{\bf SaveFile(filename, type)
}}{Saves the image using the given
455 type to the named file
}
456 \twocolitem{{\bf SaveMimeFile(filename, mimetype)
}}{Saves the image using the given
457 mimetype to the named file
}
461 \membersection{wxImage::Replace
}\label{wximagereplace
}
463 \func{void
}{Replace
}{\param{unsigned char
}{ r1
},
\param{unsigned char
}{ g1
},
\param{unsigned char
}{ b1
},
464 \param{unsigned char
}{ r2
},
\param{unsigned char
}{ g2
},
\param{unsigned char
}{ b2
}}
466 Replaces the colour specified by
{\it r1,g1,b1
} by the colour
{\it r2,g2,b2
}.
468 \membersection{wxImage::Rescale
}\label{wximagerescale
}
470 \func{wxImage \&
}{Rescale
}{\param{int
}{ width
},
\param{int
}{ height
}}
472 Changes the size of the image in-place: after a call to this function, the
473 image will have the given width and height.
475 Returns the (modified) image itself.
479 \helpref{Scale
}{wximagescale
}
481 \membersection{wxImage::Scale
}\label{wximagescale
}
483 \constfunc{wxImage
}{Scale
}{\param{int
}{ width
},
\param{int
}{ height
}}
485 Returns a scaled version of the image. This is also useful for
486 scaling bitmaps in general as the only other way to scale bitmaps
487 is to blit a wxMemoryDC into another wxMemoryDC.
489 It may be mentioned that the GTK port uses this function internally
490 to scale bitmaps when using mapping mode in wxDC.
495 // get the bitmap from somewhere
498 // rescale it to have size of
32*
32
499 if ( bmp.GetWidth() !=
32 || bmp.GetHeight() !=
32 )
502 bmp = image.Scale(
32,
32).ConvertToBitmap();
504 // another possibility:
505 image.Rescale(
32,
32);
513 \helpref{Rescale
}{wximagerescale
}
515 \membersection{wxImage::SetData
}\label{wximagesetdata
}
517 \func{void
}{SetData
}{\param{unsigned char*
}{data
}}
519 Sets the image data without performing checks. The data given must have
520 the size (width*height*
3) or results will be unexpected. Don't use this
521 method if you aren't sure you know what you are doing.
523 \membersection{wxImage::SetMask
}\label{wximagesetmask
}
525 \func{void
}{SetMask
}{\param{bool
}{ hasMask = TRUE
}}
527 Specifies whether there is a mask or not. The area of the mask is determined by the current mask colour.
529 \membersection{wxImage::SetMaskColour
}\label{wximagesetmaskcolour
}
531 \func{void
}{SetMaskColour
}{\param{unsigned char
}{red
},
\param{unsigned char
}{blue
},
\param{unsigned char
}{green
}}
533 Sets the mask colour for this image (and tells the image to use the mask).
535 \membersection{wxImage::SetRGB
}\label{wximagesetrgb
}
537 \func{void
}{SetRGB
}{\param{int
}{x
},
\param{int
}{y
},
\param{unsigned char
}{red
},
\param{unsigned char
}{blue
},
\param{unsigned char
}{green
}}
539 Sets the pixel at the given coordinate. This routine performs bounds-checks
540 for the coordinate so it can be considered a safe way to manipulate the
541 data, but in some cases this might be too slow so that the data will have to
542 be set directly. In that case you will have to get access to the image data
543 using the
\helpref{GetData
}{wximagegetdata
} method.
545 \membersection{wxImage::operator $=$
}
547 \func{wxImage\&
}{operator $=$
}{\param{const wxImage\&
}{image
}}
549 Assignment operator. This operator does not copy any data, but instead
550 passes a pointer to the data in
{\it image
} and increments a reference
551 counter. It is a fast operation.
553 \wxheading{Parameters
}
555 \docparam{image
}{Image to assign.
}
557 \wxheading{Return value
}
559 Returns 'this' object.
561 \membersection{wxImage::operator $==$
}
563 \func{bool
}{operator $==$
}{\param{const wxImage\&
}{image
}}
565 Equality operator. This operator tests whether the internal data pointers are
568 \wxheading{Parameters
}
570 \docparam{image
}{Image to compare with 'this'
}
572 \wxheading{Return value
}
574 Returns TRUE if the images were effectively equal, FALSE otherwise.
576 \membersection{wxImage::operator $!=$
}
578 \func{bool
}{operator $!=$
}{\param{const wxImage\&
}{image
}}
580 Inequality operator. This operator tests whether the internal data pointers are
581 unequal (a fast test).
583 \wxheading{Parameters
}
585 \docparam{image
}{Image to compare with 'this'
}
587 \wxheading{Return value
}
589 Returns TRUE if the images were unequal, FALSE otherwise.
591 \section{\class{wxImageHandler
}}\label{wximagehandler
}
593 This is the base class for implementing image file loading/saving, and image creation from data.
594 It is used within wxImage and is not normally seen by the application.
596 If you wish to extend the capabilities of wxImage, derive a class from wxImageHandler
597 and add the handler using
\helpref{wxImage::AddHandler
}{wximageaddhandler
} in your
598 application initialisation.
600 \wxheading{Note (Legal Issue)
}
602 This software is based in part on the work of the Independent JPEG Group.
604 (Applies when wxWindows is linked with JPEG support. wxJPEGHandler uses libjpeg
607 \wxheading{Derived from
}
609 \helpref{wxObject
}{wxobject
}
611 \wxheading{Include files
}
617 \helpref{wxImage
}{wximage
}
618 \helpref{wxInitAllImageHandlers
}{wxinitallimagehandlers
}
620 \latexignore{\rtfignore{\wxheading{Members
}}}
622 \membersection{wxImageHandler::wxImageHandler
}\label{wximagehandlerconstr
}
624 \func{}{wxImageHandler
}{\void}
626 Default constructor. In your own default constructor, initialise the members
627 m
\_name, m
\_extension and m
\_type.
629 \membersection{wxImageHandler::
\destruct{wxImageHandler
}}
631 \func{}{\destruct{wxImageHandler
}}{\void}
633 Destroys the wxImageHandler object.
635 \membersection{wxImageHandler::GetName
}
637 \constfunc{wxString
}{GetName
}{\void}
639 Gets the name of this handler.
641 \membersection{wxImageHandler::GetExtension
}
643 \constfunc{wxString
}{GetExtension
}{\void}
645 Gets the file extension associated with this handler.
647 \membersection{wxImageHandler::GetImageCount
}\label{wximagehandlergetimagecount
}
649 \func{int
}{GetImageCount
}{\param{wxInputStream\&
}{ stream
}}
651 If the image file contains more than one image and the image handler is capable
652 of retrieving these individually, this function will return the number of
655 \docparam{stream
}{Opened input stream for reading image file.
}
657 \wxheading{Return value
}
659 Number of available images. For most image handles, this defaults to
1.
661 \membersection{wxImageHandler::GetType
}
663 \constfunc{long
}{GetType
}{\void}
665 Gets the image type associated with this handler.
667 \membersection{wxImageHandler::GetMimeType
}
669 \constfunc{wxString
}{GetMimeType
}{\void}
671 Gets the MIME type associated with this handler.
673 \membersection{wxImageHandler::LoadFile
}\label{wximagehandlerloadfile
}
675 \func{bool
}{LoadFile
}{\param{wxImage*
}{image
},
\param{wxInputStream\&
}{ stream
},
\param{bool
}{ verbose=TRUE
},
\param{int
}{ index=
0}}
677 Loads a image from a stream, putting the resulting data into
{\it image
}. If the image file contains
678 more than one image and the image handler is capable of retrieving these individually,
{\it index
}
679 indicates which image to read from the stream.
681 \wxheading{Parameters
}
683 \docparam{image
}{The image object which is to be affected by this operation.
}
685 \docparam{stream
}{Opened input stream for reading images.
}
687 \docparam{verbose
}{If set to TRUE, errors reported by the image handler will produce wxLogMessages.
}
689 \docparam{index
}{The index of the image in the file (starting from zero).
}
691 \wxheading{Return value
}
693 TRUE if the operation succeeded, FALSE otherwise.
697 \helpref{wxImage::LoadFile
}{wximageloadfile
}\\
698 \helpref{wxImage::SaveFile
}{wximagesavefile
}\\
699 \helpref{wxImageHandler::SaveFile
}{wximagehandlersavefile
}
701 \membersection{wxImageHandler::SaveFile
}\label{wximagehandlersavefile
}
703 \func{bool
}{SaveFile
}{\param{wxImage*
}{image
},
\param{wxOutputStream\&
}{stream
}}
705 Saves a image in the output stream.
707 \wxheading{Parameters
}
709 \docparam{image
}{The image object which is to be affected by this operation.
}
711 \docparam{stream
}{An opened stream for writing images.
}
713 \wxheading{Return value
}
715 TRUE if the operation succeeded, FALSE otherwise.
719 \helpref{wxImage::LoadFile
}{wximageloadfile
}\\
720 \helpref{wxImage::SaveFile
}{wximagesavefile
}\\
721 \helpref{wxImageHandler::LoadFile
}{wximagehandlerloadfile
}
723 \membersection{wxImageHandler::SetName
}
725 \func{void
}{SetName
}{\param{const wxString\&
}{name
}}
727 Sets the handler name.
729 \wxheading{Parameters
}
731 \docparam{name
}{Handler name.
}
733 \membersection{wxImageHandler::SetExtension
}
735 \func{void
}{SetExtension
}{\param{const wxString\&
}{extension
}}
737 Sets the handler extension.
739 \wxheading{Parameters
}
741 \docparam{extension
}{Handler extension.
}
743 \membersection{wxImageHandler::SetType
}
745 \func{void
}{SetType
}{\param{long
}{type
}}
747 Sets the handler type.
749 \wxheading{Parameters
}
751 \docparam{name
}{Handler type.
}
754 \membersection{wxImageHandler::SetMimeType
}
756 \func{void
}{SetMimeType
}{\param{const wxString\&
}{mimetype
}}
758 Sets the handler MIME type.
760 \wxheading{Parameters
}
762 \docparam{mimename
}{Handler MIME type.
}