summaryrefslogtreecommitdiff
path: root/lib/wx/doc/src/wxImage.xml
blob: b21563d66343ade0315cccc78c950079e209058f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
<?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>
    <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>