]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/image.tex
another makefile updated
[wxWidgets.git] / docs / latex / wx / image.tex
CommitLineData
1e6d9499
JS
1\section{\class{wxImage}}\label{wximage}
2
3This class encapsulates a platform-independent image. An image can be created
4from data, or using the constructor taking a wxBitmap object. An image
5can be loaded from a file in a variety of formats, and is extensible to new formats
6via image format handlers. Functions are available to set and get image bits, so
7it can be used for basic image manipulation.
8
9A wxImage cannot (currently) be drawn directly to a wxDC. Instead, a platform-specific
12a44087
RR
10wxBitmap object must be created from it, and that bitmap drawn on the wxDC, using
11wxDC::DrawBitmap.
12
1e6d9499
JS
13\wxheading{Derived from}
14
15\helpref{wxObject}{wxobject}
16
954b8ae6
JS
17\wxheading{Include files}
18
19<wx/image.h>
20
1e6d9499
JS
21\wxheading{See also}
22
23\helpref{wxBitmap}{wxbitmap}
24
25\latexignore{\rtfignore{\wxheading{Members}}}
26
27\membersection{wxImage::wxImage}\label{wximageconstr}
28
29\func{}{wxImage}{\void}
30
31Default constructor.
32
33\func{}{wxImage}{\param{const wxImage\& }{image}}
34
35Copy constructor.
36
37\func{}{wxImage}{\param{const wxBitmap\&}{ bitmap}}
38
12a44087
RR
39Constructs an image from a platform-dependent bitmap. This preserves
40mask information so that bitmaps and images can be converted back
41and forth without loss in that respect.
1e6d9499
JS
42
43\func{}{wxImage}{\param{int}{ width}, \param{int}{ height}}
44
45Creates an image with the given width and height.
46
f6fcbb63 47\func{}{wxImage}{\param{const wxString\& }{name}, \param{long}{ type = wxBITMAP\_TYPE\_PNG}}
1e6d9499 48
9e9ee68e
VS
49\func{}{wxImage}{\param{const wxString\& }{name}, \param{const wxString\&}{ mimetype}}
50
1e6d9499
JS
51Loads an image from a file.
52
f6fcbb63 53\func{}{wxImage}{\param{wxInputStream\& }{stream}, \param{long}{ type = wxBITMAP\_TYPE\_PNG}}
45b5751f 54
9e9ee68e
VS
55\func{}{wxImage}{\param{wxInputStream\& }{stream}, \param{const wxString\&}{ mimetype}}
56
45b5751f
JS
57Loads an image from an input stream.
58
1e6d9499
JS
59\wxheading{Parameters}
60
61\docparam{width}{Specifies the width of the image.}
62
63\docparam{height}{Specifies the height of the image.}
64
65\docparam{name}{This refers to an image filename. Its meaning is determined by the {\it type} parameter.}
66
45b5751f
JS
67\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).}
68
1e6d9499
JS
69\docparam{type}{May be one of the following:
70
6be663cf 71\twocolwidtha{5cm}%
1e6d9499 72\begin{twocollist}
f6fcbb63
RR
73\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP}}}{Load a Windows bitmap file.}
74\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_PNG}}}{Load a PNG bitmap file.}
48b4e302 75\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_JPEG}}}{Load a JPEG bitmap file.}
1e6d9499
JS
76\end{twocollist}
77
78The validity of these flags depends on the platform and wxWindows configuration.
48b4e302
VS
79If all possible wxWindows settings are used, the loading a BMP (Windows bitmap) file,
80a PNG (portable network graphics) file and a JPEG file is supported on all platforms that
12a44087 81implement wxImage.}
1e6d9499 82
9e9ee68e
VS
83\docparam{mimetype}{MIME type string (for example 'image/jpeg')}
84
f899db6d 85Note : you must call wxImage::AddHandler(new wxJPEGHandler) during application
0a9f2522
VS
86initialization in order to work with JPEGs.
87
1e6d9499
JS
88\wxheading{See also}
89
90\helpref{wxImage::LoadFile}{wximageloadfile}
91
f899db6d
RD
92\pythonnote{Constructors supported by wxPython are:\par
93\indented{2cm}{\begin{twocollist}
94\twocolitem{\bf{wxImage(name, flag)}}{Loads an image from a file}
95\twocolitem{\bf{wxNullImage()}}{Create a null image (has no size or
96image data)}
97\twocolitem{\bf{wxEmptyImage(width, height)}}{Creates an empty image
98of the given size}
99\twocolitem{\bf{wxImageFromMime(name, mimetype}}{Creates an image from
100the given file of the given mimetype}
101\twocolitem{\bf{wxImageFromBitmap(bitmap)}}{Creates an image from a
102platform-dependent bitmap}
103\end{twocollist}}
104}
105
1e6d9499
JS
106\membersection{wxImage::\destruct{wxImage}}
107
108\func{}{\destruct{wxImage}}{\void}
109
110Destructor.
111
112\membersection{wxImage::AddHandler}\label{wximageaddhandler}
113
114\func{static void}{AddHandler}{\param{wxImageHandler*}{ handler}}
115
116Adds a handler to the end of the static list of format handlers.
117
118\docparam{handler}{A new image format handler object. There is usually only one instance
119of a given handler class in an application session.}
120
121\wxheading{See also}
122
123\helpref{wxImageHandler}{wximagehandler}
124
f899db6d 125\pythonnote{In wxPython this static method is named \tt{wxImage_AddHandler}.}
1e6d9499
JS
126\membersection{wxImage::CleanUpHandlers}
127
128\func{static void}{CleanUpHandlers}{\void}
129
130Deletes all image handlers.
131
132This function is called by wxWindows on exit.
133
134\membersection{wxImage::ConvertToBitmap}\label{wximageconverttobitmap}
135
136\constfunc{wxBitmap}{ConvertToBitmap}{\void}
137
12a44087
RR
138Converts the image to a platform-specific bitmap object. This has to be done
139to actually display an image as you cannot draw an image directly on a window.
140The resulting bitmap will use the colour depth of the current system which entails
f6fcbb63
RR
141that a (crude) colour reduction has to take place. When in 8-bit mode, this
142routine will use a color cube created on program start-up to look up colors.
143Still, the image quality won't be perfect for photo images.
1e6d9499
JS
144
145\membersection{wxImage::Create}\label{wximagecreate}
146
147\func{bool}{Create}{\param{int}{ width}, \param{int}{ height}}
148
149Creates a fresh image.
150
151\wxheading{Parameters}
152
153\docparam{width}{The width of the image in pixels.}
154
155\docparam{height}{The height of the image in pixels.}
156
157\wxheading{Return value}
158
159TRUE if the call succeeded, FALSE otherwise.
160
161\membersection{wxImage::Destroy}\label{wximagedestroy}
162
163\func{bool}{Destroy}{\void}
164
165Destroys the image data.
166
167\membersection{wxImage::FindHandler}
168
169\func{static wxImageHandler*}{FindHandler}{\param{const wxString\& }{name}}
170
171Finds the handler with the given name.
172
173\func{static wxImageHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{long}{ imageType}}
174
175Finds the handler associated with the given extension and type.
176
177\func{static wxImageHandler*}{FindHandler}{\param{long }{imageType}}
178
179Finds the handler associated with the given image type.
180
9e9ee68e
VS
181\func{static wxImageHandler*}{FindHandlerMime}{\param{const wxString\& }{mimetype}}
182
183Finds the handler associated with the given MIME type.
184
1e6d9499
JS
185\docparam{name}{The handler name.}
186
187\docparam{extension}{The file extension, such as ``bmp".}
188
f6fcbb63 189\docparam{imageType}{The image type, such as wxBITMAP\_TYPE\_BMP.}
1e6d9499 190
9e9ee68e
VS
191\docparam{mimetype}{MIME type.}
192
1e6d9499
JS
193\wxheading{Return value}
194
195A pointer to the handler if found, NULL otherwise.
196
197\wxheading{See also}
198
199\helpref{wxImageHandler}{wximagehandler}
200
201\membersection{wxImage::GetBlue}\label{wximagegetblue}
202
203\constfunc{unsigned char}{GetBlue}{\param{int}{ x}, \param{int}{ y}}
204
205Returns the blue intensity at the given coordinate.
206
207\membersection{wxImage::GetData}\label{wximagegetdata}
208
209\constfunc{unsigned char*}{GetData}{\void}
210
12a44087
RR
211Returns the image data as an array. This is most often used when doing
212direct image manipulation. The return value points to an array of
213chararcters in RGBGBRGB... format.
1e6d9499
JS
214
215\membersection{wxImage::GetGreen}\label{wximagegetgreen}
216
217\constfunc{unsigned char}{GetGreen}{\param{int}{ x}, \param{int}{ y}}
218
219Returns the green intensity at the given coordinate.
220
221\membersection{wxImage::GetRed}\label{wximagegetred}
222
223\constfunc{unsigned char}{GetRed}{\param{int}{ x}, \param{int}{ y}}
224
225Returns the red intensity at the given coordinate.
226
227\membersection{wxImage::GetHandlers}
228
229\func{static wxList\&}{GetHandlers}{\void}
230
231Returns the static list of image format handlers.
232
233\wxheading{See also}
234
235\helpref{wxImageHandler}{wximagehandler}
236
237\membersection{wxImage::GetHeight}\label{wximagegetheight}
238
239\constfunc{int}{GetHeight}{\void}
240
241Gets the height of the image in pixels.
242
243\membersection{wxImage::GetMaskBlue}\label{wximagegetmaskblue}
244
245\constfunc{unsigned char}{GetMaskBlue}{\void}
246
247Gets the blue value of the mask colour.
248
249\membersection{wxImage::GetMaskGreen}\label{wximagegetmaskgreen}
250
251\constfunc{unsigned char}{GetMaskGreen}{\void}
252
253Gets the green value of the mask colour.
254
255\membersection{wxImage::GetMaskRed}\label{wximagegetmaskred}
256
257\constfunc{unsigned char}{GetMaskRed}{\void}
258
259Gets the red value of the mask colour.
260
261\membersection{wxImage::GetWidth}\label{wximagegetwidth}
262
263\constfunc{int}{GetWidth}{\void}
264
265Gets the width of the image in pixels.
266
267\wxheading{See also}
268
269\helpref{wxImage::GetHeight}{wximagegetheight}
270
271\membersection{wxImage::HasMask}\label{wximagehasmask}
272
273\constfunc{bool}{HasMask}{\void}
274
275Returns TRUE if there is a mask active, FALSE otherwise.
276
277\membersection{wxImage::InitStandardHandlers}
278
279\func{static void}{InitStandardHandlers}{\void}
280
281Adds the standard image format handlers, which, depending on wxWindows
48b4e302
VS
282configuration, can be handlers for Windows BMP (loading), PNG
283(loading and saving) and JPEG (loading and saving) file formats.
1e6d9499
JS
284
285This function is called by wxWindows on startup.
286
287\wxheading{See also}
288
289\helpref{wxImageHandler}{wximagehandler}
290
291\membersection{wxImage::InsertHandler}
292
293\func{static void}{InsertHandler}{\param{wxImageHandler*}{ handler}}
294
295Adds a handler at the start of the static list of format handlers.
296
297\docparam{handler}{A new image format handler object. There is usually only one instance
298of a given handler class in an application session.}
299
300\wxheading{See also}
301
302\helpref{wxImageHandler}{wximagehandler}
303
304\membersection{wxImage::LoadFile}\label{wximageloadfile}
305
306\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{long}{ type}}
307
9e9ee68e
VS
308\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{const wxString\&}{ mimetype}}
309
1e6d9499
JS
310Loads an image from a file.
311
45b5751f
JS
312\func{bool}{LoadFile}{\param{wxInputStream\&}{ stream}, \param{long}{ type}}
313
9e9ee68e
VS
314\func{bool}{LoadFile}{\param{wxInputStream\&}{ stream}, \param{const wxString\&}{ mimetype}}
315
45b5751f
JS
316Loads an image from an input stream.
317
1e6d9499
JS
318\wxheading{Parameters}
319
320\docparam{name}{A filename.
321The meaning of {\it name} is determined by the {\it type} parameter.}
322
45b5751f
JS
323\docparam{stream}{An input stream.
324The meaning of {\it stream} data is determined by the {\it type} parameter.}
325
1e6d9499
JS
326\docparam{type}{One of the following values:
327
6be663cf 328\twocolwidtha{5cm}%
1e6d9499 329\begin{twocollist}
f6fcbb63
RR
330\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Load a Windows image file.}
331\twocolitem{{\bf wxBITMAP\_TYPE\_PNG}}{Load a PNG image file.}
48b4e302 332\twocolitem{{\bf wxBITMAP\_TYPE\_JPEG}}{Load a JPEG image file.}
1e6d9499
JS
333\end{twocollist}
334
335The validity of these flags depends on the platform and wxWindows configuration.}
336
9e9ee68e
VS
337\docparam{mimetype}{MIME type string (for example 'image/jpeg')}
338
1e6d9499
JS
339\wxheading{Return value}
340
341TRUE if the operation succeeded, FALSE otherwise.
342
343\wxheading{See also}
344
345\helpref{wxImage::SaveFile}{wximagesavefile}
346
f899db6d
RD
347\pythonnote{In place of a single overloaded method name, wxPython
348implements the following methods:\par
349\indented{2cm}{\begin{twocollist}
350\twocolitem{\bf{LoadFile(filename, type)}}{Loads an image of the given
351type from a file}
352\twocolitem{\bf{LoadMimeFile(filename, mimetype)}}{Loads an image of the given
353mimetype from a file}
354\end{twocollist}}
355}
356
357
1e6d9499
JS
358\membersection{wxImage::Ok}\label{wximageok}
359
360\constfunc{bool}{Ok}{\void}
361
362Returns TRUE if image data is present.
363
364\membersection{wxImage::RemoveHandler}
365
366\func{static bool}{RemoveHandler}{\param{const wxString\& }{name}}
367
368Finds the handler with the given name, and removes it. The handler
369is not deleted.
370
371\docparam{name}{The handler name.}
372
373\wxheading{Return value}
374
375TRUE if the handler was found and removed, FALSE otherwise.
376
377\wxheading{See also}
378
379\helpref{wxImageHandler}{wximagehandler}
380
381\membersection{wxImage::SaveFile}\label{wximagesavefile}
382
383\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}}
384
9e9ee68e
VS
385\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{const wxString\&}{ mimetype}}
386
1e6d9499
JS
387Saves a image in the named file.
388
45b5751f
JS
389\func{bool}{SaveFile}{\param{wxOutputStream\& }{stream}, \param{int}{ type}}
390
9e9ee68e
VS
391\func{bool}{SaveFile}{\param{wxOutputStream\& }{stream}, \param{const wxString\&}{ mimetype}}
392
45b5751f
JS
393Saves a image in the given stream.
394
1e6d9499
JS
395\wxheading{Parameters}
396
397\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
398
45b5751f
JS
399\docparam{stream}{An output stream. The meaning of {\it stream} is determined by the {\it type} parameter.}
400
48b4e302 401\docparam{type}{Currently two types can be used:
1e6d9499 402
6be663cf 403\twocolwidtha{5cm}%
1e6d9499 404\begin{twocollist}
f6fcbb63 405\twocolitem{{\bf wxBITMAP\_TYPE\_PNG}}{Save a PNG image file.}
48b4e302 406\twocolitem{{\bf wxBITMAP\_TYPE\_JPEG}}{Save a JPEG image file.}
1e6d9499
JS
407\end{twocollist}
408
12a44087
RR
409The validity of these flags depends on the platform and wxWindows configuration
410as well as user-added handlers.}
1e6d9499 411
9e9ee68e
VS
412\docparam{mimetype}{MIME type.}
413
1e6d9499
JS
414\wxheading{Return value}
415
416TRUE if the operation succeeded, FALSE otherwise.
417
418\wxheading{Remarks}
419
420Depending on how wxWindows has been configured, not all formats may be available.
421
422\wxheading{See also}
423
424\helpref{wxImage::LoadFile}{wximageloadfile}
425
f899db6d
RD
426\pythonnote{In place of a single overloaded method name, wxPython
427implements the following methods:\par
428\indented{2cm}{\begin{twocollist}
429\twocolitem{\bf{SaveFile(filename, type)}}{Saves the image using the given
430type to the named file}
431\twocolitem{\bf{SaveMimeFile(filename, mimetype)}}{Saves the image using the given
432mimetype to the named file}
433\end{twocollist}}
434}
435
ce9a75d2
VZ
436\membersection{wxImage::Rescale}\label{wximagerescale}
437
438\func{wxImage}{Rescale}{\param{int}{ width}, \param{int}{ height}}
439
440Changes the size of the image in-place: after a call to this function, thei
441mage will have the given width and height.
442
443\wxheading{See also}
444
445\helpref{Scale}{wximagescale}
446
1e6d9499
JS
447\membersection{wxImage::Scale}\label{wximagescale}
448
ce9a75d2 449\constfunc{wxImage}{Scale}{\param{int}{ width}, \param{int}{ height}}
1e6d9499 450
12a44087
RR
451Returns a scaled version of the image. This is also useful for
452scaling bitmaps in general as the only other way to scale bitmaps
ce9a75d2
VZ
453is to blit a wxMemoryDC into another wxMemoryDC.
454
455NB: although Windows can do such scaling itself but in the GTK port, scaling
456bitmaps is done using this routine internally.
457
458Example:
459
460\begin{verbatim}
461 // get the bitmap from somewhere
462 wxBitmap bmp = ...;
463
464 // rescale it to have size of 32*32
465 if ( bmp.GetWidth() != 32 || bmp.GetHeight() != 32 )
466 {
467 wxImage image(bmp);
468 bmp = image.Scale(32, 32).ConvertToBitmap();
469
470 // another possibility:
471 image.Rescale(32, 32);
472 bmp = image;
473 }
474
475\end{verbatim}
476
477\wxheading{See also}
478
479\helpref{Rescale}{wximagerescale}
1e6d9499
JS
480
481\membersection{wxImage::SetData}\label{wximagesetdata}
482
483\func{void}{SetData}{\param{unsigned char*}{data}}
484
f899db6d 485Sets the image data without performing checks. The data given must have
12a44087
RR
486the size (width*height*3) or results will be unexpected. Don't use this
487method if you aren't sure you know what you are doing.
1e6d9499
JS
488
489\membersection{wxImage::SetMask}\label{wximagesetmask}
490
491\func{void}{SetMask}{\param{bool}{ hasMask = TRUE}}
492
493Specifies whether there is a mask or not. The area of the mask is determined by the current mask colour.
494
495\membersection{wxImage::SetMaskColour}\label{wximagesetmaskcolour}
496
497\func{void}{SetMaskColour}{\param{unsigned char }{red}, \param{unsigned char }{blue}, \param{unsigned char }{green}}
498
b1170810 499Sets the mask colour for this image (and tells the image to use the mask).
1e6d9499
JS
500
501\membersection{wxImage::SetRGB}\label{wximagesetrgb}
502
503\func{void}{SetRGB}{\param{int }{x}, \param{int }{y}, \param{unsigned char }{red}, \param{unsigned char }{blue}, \param{unsigned char }{green}}
504
12a44087
RR
505Sets the pixel at the given coordinate. This routine performs bounds-checks
506for the coordinate so it can be considered a safe way to manipulate the
507data, but in some cases this might be too slow so that the data will have to
508be set directly. In that case you have to get that data by calling GetData().
1e6d9499
JS
509
510\membersection{wxImage::operator $=$}
511
512\func{wxImage\& }{operator $=$}{\param{const wxImage\& }{image}}
513
514Assignment operator. This operator does not copy any data, but instead
515passes a pointer to the data in {\it image} and increments a reference
516counter. It is a fast operation.
517
518\wxheading{Parameters}
519
520\docparam{image}{Image to assign.}
521
522\wxheading{Return value}
523
524Returns 'this' object.
525
526\membersection{wxImage::operator $==$}
527
528\func{bool}{operator $==$}{\param{const wxImage\& }{image}}
529
530Equality operator. This operator tests whether the internal data pointers are
531equal (a fast test).
532
533\wxheading{Parameters}
534
535\docparam{image}{Image to compare with 'this'}
536
537\wxheading{Return value}
538
539Returns TRUE if the images were effectively equal, FALSE otherwise.
540
541\membersection{wxImage::operator $!=$}
542
543\func{bool}{operator $!=$}{\param{const wxImage\& }{image}}
544
545Inequality operator. This operator tests whether the internal data pointers are
546unequal (a fast test).
547
548\wxheading{Parameters}
549
550\docparam{image}{Image to compare with 'this'}
551
552\wxheading{Return value}
553
554Returns TRUE if the images were unequal, FALSE otherwise.
555
556\section{\class{wxImageHandler}}\label{wximagehandler}
557
1e6d9499
JS
558This is the base class for implementing image file loading/saving, and image creation from data.
559It is used within wxImage and is not normally seen by the application.
560
561If you wish to extend the capabilities of wxImage, derive a class from wxImageHandler
562and add the handler using \helpref{wxImage::AddHandler}{wximageaddhandler} in your
563application initialisation.
564
48b4e302
VS
565\wxheading{Note (Legal Issue)}
566
954b8ae6 567This software is based in part on the work of the Independent JPEG Group.
48b4e302
VS
568
569(Applies when wxWindows is linked with JPEG support. wxJPEGHandler uses libjpeg
570created by IJG.)
571
1e6d9499
JS
572\wxheading{Derived from}
573
574\helpref{wxObject}{wxobject}
575
954b8ae6
JS
576\wxheading{Include files}
577
578<wx/image.h>
579
1e6d9499
JS
580\wxheading{See also}
581
582\helpref{wxImage}{wximage}
583
584\latexignore{\rtfignore{\wxheading{Members}}}
585
586\membersection{wxImageHandler::wxImageHandler}\label{wximagehandlerconstr}
587
588\func{}{wxImageHandler}{\void}
589
590Default constructor. In your own default constructor, initialise the members
591m\_name, m\_extension and m\_type.
592
593\membersection{wxImageHandler::\destruct{wxImageHandler}}
594
595\func{}{\destruct{wxImageHandler}}{\void}
596
597Destroys the wxImageHandler object.
598
599\membersection{wxImageHandler::GetName}
600
601\constfunc{wxString}{GetName}{\void}
602
603Gets the name of this handler.
604
605\membersection{wxImageHandler::GetExtension}
606
607\constfunc{wxString}{GetExtension}{\void}
608
609Gets the file extension associated with this handler.
610
611\membersection{wxImageHandler::GetType}
612
613\constfunc{long}{GetType}{\void}
614
615Gets the image type associated with this handler.
616
9e9ee68e
VS
617\membersection{wxImageHandler::GetMimeType}
618
619\constfunc{wxString}{GetMimeType}{\void}
620
621Gets the MIME type associated with this handler.
622
1e6d9499
JS
623\membersection{wxImageHandler::LoadFile}\label{wximagehandlerloadfile}
624
45b5751f 625\func{bool}{LoadFile}{\param{wxImage* }{image}, \param{wxInputStream\&}{ stream}}
1e6d9499 626
45b5751f 627Loads a image from a stream, putting the resulting data into {\it image}.
1e6d9499
JS
628
629\wxheading{Parameters}
630
631\docparam{image}{The image object which is to be affected by this operation.}
632
45b5751f
JS
633\docparam{stream}{Opened input stream.
634The meaning of {\it stream} is determined by the {\it type} parameter.}
1e6d9499
JS
635
636\wxheading{Return value}
637
638TRUE if the operation succeeded, FALSE otherwise.
639
640\wxheading{See also}
641
642\helpref{wxImage::LoadFile}{wximageloadfile}\\
643\helpref{wxImage::SaveFile}{wximagesavefile}\\
644\helpref{wxImageHandler::SaveFile}{wximagehandlersavefile}
645
646\membersection{wxImageHandler::SaveFile}\label{wximagehandlersavefile}
647
45b5751f 648\func{bool}{SaveFile}{\param{wxImage* }{image}, \param{wxOutputStream\& }{stream}}
1e6d9499 649
45b5751f 650Saves a image in the output stream.
1e6d9499
JS
651
652\wxheading{Parameters}
653
654\docparam{image}{The image object which is to be affected by this operation.}
655
45b5751f 656\docparam{stream}{A stream. The meaning of {\it stream} is determined by the {\it type} parameter.}
1e6d9499
JS
657
658\wxheading{Return value}
659
660TRUE if the operation succeeded, FALSE otherwise.
661
662\wxheading{See also}
663
664\helpref{wxImage::LoadFile}{wximageloadfile}\\
665\helpref{wxImage::SaveFile}{wximagesavefile}\\
666\helpref{wxImageHandler::LoadFile}{wximagehandlerloadfile}
667
668\membersection{wxImageHandler::SetName}
669
670\func{void}{SetName}{\param{const wxString\& }{name}}
671
672Sets the handler name.
673
674\wxheading{Parameters}
675
676\docparam{name}{Handler name.}
677
678\membersection{wxImageHandler::SetExtension}
679
680\func{void}{SetExtension}{\param{const wxString\& }{extension}}
681
682Sets the handler extension.
683
684\wxheading{Parameters}
685
686\docparam{extension}{Handler extension.}
687
688\membersection{wxImageHandler::SetType}
689
690\func{void}{SetType}{\param{long }{type}}
691
692Sets the handler type.
693
694\wxheading{Parameters}
695
696\docparam{name}{Handler type.}
697
9e9ee68e
VS
698
699\membersection{wxImageHandler::SetMimeType}
700
701\func{void}{SetMimeType}{\param{const wxString\& }{mimetype}}
702
703Sets the handler MIME type.
704
705\wxheading{Parameters}
706
707\docparam{mimename}{Handler MIME type.}
708