- Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathqimagereader.go
1194 lines (955 loc) · 42.8 KB
/
qimagereader.go
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
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package qtgui
// /usr/include/qt/QtGui/qimagereader.h
// #include <qimagereader.h>
// #include <QtGui>
// header block end
// main block begin
// main block end
// use block begin
// use block end
// ext block begin
/*
#include <stdlib.h>
// extern C begin: 5
*/
// import "C"
import"unsafe"
import"reflect"
import"fmt"
import"log"
import"github.com/kitech/qt.go/qtrt"
import"github.com/kitech/qt.go/qtcore"
// ext block end
// body block begin
/*
*/
typeQImageReaderstruct {
*qtrt.CObject
}
typeQImageReader_ITFinterface {
QImageReader_PTR() *QImageReader
}
func (ptr*QImageReader) QImageReader_PTR() *QImageReader { returnptr }
func (this*QImageReader) GetCthis() unsafe.Pointer {
ifthis==nil {
returnnil
} else {
returnthis.Cthis
}
}
func (this*QImageReader) SetCthis(cthis unsafe.Pointer) {
ifthis.CObject==nil {
this.CObject=&qtrt.CObject{cthis}
} else {
this.CObject.Cthis=cthis
}
}
funcNewQImageReaderFromPointer(cthis unsafe.Pointer) *QImageReader {
return&QImageReader{&qtrt.CObject{cthis}}
}
func (*QImageReader) NewFromPointer(cthis unsafe.Pointer) *QImageReader {
returnNewQImageReaderFromPointer(cthis)
}
// /usr/include/qt/QtGui/qimagereader.h:71
// index:0
// Public Visibility=Default Availability=Available
// [-2] void QImageReader()
/*
Constructs an empty QImageReader object. Before reading an image, call setDevice() or setFileName().
*/
func (*QImageReader) NewForInherit() *QImageReader {
returnNewQImageReader()
}
funcNewQImageReader() *QImageReader {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReaderC2Ev", qtrt.FFI_TYPE_POINTER)
qtrt.ErrPrint(err, rv)
gothis:=NewQImageReaderFromPointer(unsafe.Pointer(uintptr(rv)))
qtrt.SetFinalizer(gothis, DeleteQImageReader)
returngothis
}
// /usr/include/qt/QtGui/qimagereader.h:72
// index:1
// Public Visibility=Default Availability=Available
// [-2] void QImageReader(QIODevice *, const QByteArray &)
/*
Constructs an empty QImageReader object. Before reading an image, call setDevice() or setFileName().
*/
func (*QImageReader) NewForInherit1(device qtcore.QIODevice_ITF/*777 QIODevice **/, format qtcore.QByteArray_ITF) *QImageReader {
returnNewQImageReader1(device, format)
}
funcNewQImageReader1(device qtcore.QIODevice_ITF/*777 QIODevice **/, format qtcore.QByteArray_ITF) *QImageReader {
varconvArg0 unsafe.Pointer
ifdevice!=nil&&device.QIODevice_PTR() !=nil {
convArg0=device.QIODevice_PTR().GetCthis()
}
varconvArg1 unsafe.Pointer
ifformat!=nil&&format.QByteArray_PTR() !=nil {
convArg1=format.QByteArray_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReaderC2EP9QIODeviceRK10QByteArray", qtrt.FFI_TYPE_POINTER, convArg0, convArg1)
qtrt.ErrPrint(err, rv)
gothis:=NewQImageReaderFromPointer(unsafe.Pointer(uintptr(rv)))
qtrt.SetFinalizer(gothis, DeleteQImageReader)
returngothis
}
// /usr/include/qt/QtGui/qimagereader.h:72
// index:1
// Public Visibility=Default Availability=Available
// [-2] void QImageReader(QIODevice *, const QByteArray &)
/*
Constructs an empty QImageReader object. Before reading an image, call setDevice() or setFileName().
*/
func (*QImageReader) NewForInherit1p(device qtcore.QIODevice_ITF/*777 QIODevice **/) *QImageReader {
returnNewQImageReader1p(device)
}
funcNewQImageReader1p(device qtcore.QIODevice_ITF/*777 QIODevice **/) *QImageReader {
varconvArg0 unsafe.Pointer
ifdevice!=nil&&device.QIODevice_PTR() !=nil {
convArg0=device.QIODevice_PTR().GetCthis()
}
// arg: 1, const QByteArray &=LValueReference, QByteArray=Record, , Invalid
varconvArg1=qtcore.NewQByteArray()
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReaderC2EP9QIODeviceRK10QByteArray", qtrt.FFI_TYPE_POINTER, convArg0, convArg1)
qtrt.ErrPrint(err, rv)
gothis:=NewQImageReaderFromPointer(unsafe.Pointer(uintptr(rv)))
qtrt.SetFinalizer(gothis, DeleteQImageReader)
returngothis
}
// /usr/include/qt/QtGui/qimagereader.h:73
// index:2
// Public Visibility=Default Availability=Available
// [-2] void QImageReader(const QString &, const QByteArray &)
/*
Constructs an empty QImageReader object. Before reading an image, call setDevice() or setFileName().
*/
func (*QImageReader) NewForInherit2(fileNamestring, format qtcore.QByteArray_ITF) *QImageReader {
returnNewQImageReader2(fileName, format)
}
funcNewQImageReader2(fileNamestring, format qtcore.QByteArray_ITF) *QImageReader {
vartmpArg0=qtcore.NewQString5(fileName)
varconvArg0=tmpArg0.GetCthis()
varconvArg1 unsafe.Pointer
ifformat!=nil&&format.QByteArray_PTR() !=nil {
convArg1=format.QByteArray_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReaderC2ERK7QStringRK10QByteArray", qtrt.FFI_TYPE_POINTER, convArg0, convArg1)
qtrt.ErrPrint(err, rv)
gothis:=NewQImageReaderFromPointer(unsafe.Pointer(uintptr(rv)))
qtrt.SetFinalizer(gothis, DeleteQImageReader)
returngothis
}
// /usr/include/qt/QtGui/qimagereader.h:73
// index:2
// Public Visibility=Default Availability=Available
// [-2] void QImageReader(const QString &, const QByteArray &)
/*
Constructs an empty QImageReader object. Before reading an image, call setDevice() or setFileName().
*/
func (*QImageReader) NewForInherit2p(fileNamestring) *QImageReader {
returnNewQImageReader2p(fileName)
}
funcNewQImageReader2p(fileNamestring) *QImageReader {
vartmpArg0=qtcore.NewQString5(fileName)
varconvArg0=tmpArg0.GetCthis()
// arg: 1, const QByteArray &=LValueReference, QByteArray=Record, , Invalid
varconvArg1=qtcore.NewQByteArray()
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReaderC2ERK7QStringRK10QByteArray", qtrt.FFI_TYPE_POINTER, convArg0, convArg1)
qtrt.ErrPrint(err, rv)
gothis:=NewQImageReaderFromPointer(unsafe.Pointer(uintptr(rv)))
qtrt.SetFinalizer(gothis, DeleteQImageReader)
returngothis
}
// /usr/include/qt/QtGui/qimagereader.h:74
// index:0
// Public Visibility=Default Availability=Available
// [-2] void ~QImageReader()
/*
*/
funcDeleteQImageReader(this*QImageReader) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReaderD2Ev", qtrt.FFI_TYPE_VOID, this.GetCthis())
qtrt.Cmemset(this.GetCthis(), 9, 8)
qtrt.ErrPrint(err, rv)
this.SetCthis(nil)
}
// /usr/include/qt/QtGui/qimagereader.h:76
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setFormat(const QByteArray &)
/*
Sets the format QImageReader will use when reading images, to format. format is a case insensitive text string. Example:
QImageReader reader;
reader.setFormat("png"); // same as reader.setFormat("PNG");
You can call supportedImageFormats() for the full list of formats QImageReader supports.
See also format().
*/
func (this*QImageReader) SetFormat(format qtcore.QByteArray_ITF) {
varconvArg0 unsafe.Pointer
ifformat!=nil&&format.QByteArray_PTR() !=nil {
convArg0=format.QByteArray_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader9setFormatERK10QByteArray", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:77
// index:0
// Public Visibility=Default Availability=Available
// [8] QByteArray format() const
/*
Returns the format QImageReader uses for reading images.
You can call this function after assigning a device to the reader to determine the format of the device. For example:
QImageReader reader("image.png");
// reader.format() == "png"
If the reader cannot read any image from the device (e.g., there is no image there, or the image has already been read), or if the format is unsupported, this function returns an empty QByteArray().
See also setFormat() and supportedImageFormats().
*/
func (this*QImageReader) Format() *qtcore.QByteArray/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader6formatEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQByteArrayFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQByteArray)
returnrv2
}
// /usr/include/qt/QtGui/qimagereader.h:79
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setAutoDetectImageFormat(bool)
/*
If enabled is true, image format autodetection is enabled; otherwise, it is disabled. By default, autodetection is enabled.
QImageReader uses an extensive approach to detecting the image format; firstly, if you pass a file name to QImageReader, it will attempt to detect the file extension if the given file name does not point to an existing file, by appending supported default extensions to the given file name, one at a time. It then uses the following approach to detect the image format:
Image plugins are queried first, based on either the optional format string, or the file name suffix (if the source device is a file). No content detection is done at this stage. QImageReader will choose the first plugin that supports reading for this format.
If no plugin supports the image format, Qt's built-in handlers are checked based on either the optional format string, or the file name suffix.
If no capable plugins or built-in handlers are found, each plugin is tested by inspecting the content of the data stream.
If no plugins could detect the image format based on data contents, each built-in image handler is tested by inspecting the contents.
Finally, if all above approaches fail, QImageReader will report failure when trying to read the image.
By disabling image format autodetection, QImageReader will only query the plugins and built-in handlers based on the format string (i.e., no file name extensions are tested).
See also autoDetectImageFormat(), QImageIOHandler::canRead(), and QImageIOPlugin::capabilities().
*/
func (this*QImageReader) SetAutoDetectImageFormat(enabledbool) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader24setAutoDetectImageFormatEb", qtrt.FFI_TYPE_POINTER, this.GetCthis(), enabled)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:80
// index:0
// Public Visibility=Default Availability=Available
// [1] bool autoDetectImageFormat() const
/*
Returns true if image format autodetection is enabled on this image reader; otherwise returns false. By default, autodetection is enabled.
See also setAutoDetectImageFormat().
*/
func (this*QImageReader) AutoDetectImageFormat() bool {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader21autoDetectImageFormatEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qimagereader.h:82
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setDecideFormatFromContent(bool)
/*
If ignored is set to true, then the image reader will ignore specified formats or file extensions and decide which plugin to use only based on the contents in the datastream.
Setting this flag means that all image plugins gets loaded. Each plugin will read the first bytes in the image data and decide if the plugin is compatible or not.
This also disables auto detecting the image format.
See also decideFormatFromContent().
*/
func (this*QImageReader) SetDecideFormatFromContent(ignoredbool) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader26setDecideFormatFromContentEb", qtrt.FFI_TYPE_POINTER, this.GetCthis(), ignored)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:83
// index:0
// Public Visibility=Default Availability=Available
// [1] bool decideFormatFromContent() const
/*
Returns whether the image reader should decide which plugin to use only based on the contents of the datastream rather than on the file extension.
See also setDecideFormatFromContent().
*/
func (this*QImageReader) DecideFormatFromContent() bool {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader23decideFormatFromContentEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qimagereader.h:85
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setDevice(QIODevice *)
/*
Sets QImageReader's device to device. If a device has already been set, the old device is removed from QImageReader and is otherwise left unchanged.
If the device is not already open, QImageReader will attempt to open the device in QIODevice::ReadOnly mode by calling open(). Note that this does not work for certain devices, such as QProcess, QTcpSocket and QUdpSocket, where more logic is required to open the device.
See also device() and setFileName().
*/
func (this*QImageReader) SetDevice(device qtcore.QIODevice_ITF/*777 QIODevice **/) {
varconvArg0 unsafe.Pointer
ifdevice!=nil&&device.QIODevice_PTR() !=nil {
convArg0=device.QIODevice_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader9setDeviceEP9QIODevice", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:86
// index:0
// Public Visibility=Default Availability=Available
// [8] QIODevice * device() const
/*
Returns the device currently assigned to QImageReader, or 0 if no device has been assigned.
See also setDevice().
*/
func (this*QImageReader) Device() *qtcore.QIODevice/*777 QIODevice **/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader6deviceEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnqtcore.NewQIODeviceFromPointer(unsafe.Pointer(uintptr(rv))) // 444
}
// /usr/include/qt/QtGui/qimagereader.h:88
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setFileName(const QString &)
/*
Sets the file name of QImageReader to fileName. Internally, QImageReader will create a QFile object and open it in QIODevice::ReadOnly mode, and use this when reading images.
If fileName does not include a file extension (e.g., .png or .bmp), QImageReader will cycle through all supported extensions until it finds a matching file.
See also fileName(), setDevice(), and supportedImageFormats().
*/
func (this*QImageReader) SetFileName(fileNamestring) {
vartmpArg0=qtcore.NewQString5(fileName)
varconvArg0=tmpArg0.GetCthis()
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader11setFileNameERK7QString", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:89
// index:0
// Public Visibility=Default Availability=Available
// [8] QString fileName() const
/*
If the currently assigned device is a QFile, or if setFileName() has been called, this function returns the name of the file QImageReader reads from. Otherwise (i.e., if no device has been assigned or the device is not a QFile), an empty QString is returned.
See also setFileName() and setDevice().
*/
func (this*QImageReader) FileName() string {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader8fileNameEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQStringFromPointer(unsafe.Pointer(uintptr(rv)))
rv3:=rv2.ToUtf8().Data()
qtcore.DeleteQString(rv2)
returnrv3
}
// /usr/include/qt/QtGui/qimagereader.h:91
// index:0
// Public Visibility=Default Availability=Available
// [8] QSize size() const
/*
Returns the size of the image, without actually reading the image contents.
If the image format does not support this feature, this function returns an invalid size. Qt's built-in image handlers all support this feature, but custom image format plugins are not required to do so.
See also QImageIOHandler::ImageOption, QImageIOHandler::option(), and QImageIOHandler::supportsOption().
*/
func (this*QImageReader) Size() *qtcore.QSize/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader4sizeEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQSizeFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQSize)
returnrv2
}
// /usr/include/qt/QtGui/qimagereader.h:93
// index:0
// Public Visibility=Default Availability=Available
// [4] QImage::Format imageFormat() const
/*
Returns the format of the image, without actually reading the image contents. The format describes the image format QImageReader::read() returns, not the format of the actual image.
If the image format does not support this feature, this function returns an invalid format.
This function was introduced in Qt 4.5.
See also QImageIOHandler::ImageOption, QImageIOHandler::option(), and QImageIOHandler::supportsOption().
*/
func (this*QImageReader) ImageFormat() int {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader11imageFormatEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnint(rv)
}
// /usr/include/qt/QtGui/qimagereader.h:143
// index:1
// Public static Visibility=Default Availability=Available
// [8] QByteArray imageFormat(const QString &)
/*
Returns the format of the image, without actually reading the image contents. The format describes the image format QImageReader::read() returns, not the format of the actual image.
If the image format does not support this feature, this function returns an invalid format.
This function was introduced in Qt 4.5.
See also QImageIOHandler::ImageOption, QImageIOHandler::option(), and QImageIOHandler::supportsOption().
*/
func (this*QImageReader) ImageFormat1(fileNamestring) *qtcore.QByteArray/*123*/ {
vartmpArg0=qtcore.NewQString5(fileName)
varconvArg0=tmpArg0.GetCthis()
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader11imageFormatERK7QString", qtrt.FFI_TYPE_POINTER, convArg0)
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQByteArrayFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQByteArray)
returnrv2
}
funcQImageReader_ImageFormat1(fileNamestring) *qtcore.QByteArray/*123*/ {
varnilthis*QImageReader
rv:=nilthis.ImageFormat1(fileName)
returnrv
}
// /usr/include/qt/QtGui/qimagereader.h:144
// index:2
// Public static Visibility=Default Availability=Available
// [8] QByteArray imageFormat(QIODevice *)
/*
Returns the format of the image, without actually reading the image contents. The format describes the image format QImageReader::read() returns, not the format of the actual image.
If the image format does not support this feature, this function returns an invalid format.
This function was introduced in Qt 4.5.
See also QImageIOHandler::ImageOption, QImageIOHandler::option(), and QImageIOHandler::supportsOption().
*/
func (this*QImageReader) ImageFormat2(device qtcore.QIODevice_ITF/*777 QIODevice **/) *qtcore.QByteArray/*123*/ {
varconvArg0 unsafe.Pointer
ifdevice!=nil&&device.QIODevice_PTR() !=nil {
convArg0=device.QIODevice_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader11imageFormatEP9QIODevice", qtrt.FFI_TYPE_POINTER, convArg0)
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQByteArrayFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQByteArray)
returnrv2
}
funcQImageReader_ImageFormat2(device qtcore.QIODevice_ITF/*777 QIODevice **/) *qtcore.QByteArray/*123*/ {
varnilthis*QImageReader
rv:=nilthis.ImageFormat2(device)
returnrv
}
// /usr/include/qt/QtGui/qimagereader.h:95
// index:0
// Public Visibility=Default Availability=Available
// [8] QStringList textKeys() const
/*
Returns the text keys for this image. You can use these keys with text() to list the image text for a certain key.
Support for this option is implemented through QImageIOHandler::Description.
This function was introduced in Qt 4.1.
See also text(), QImageWriter::setText(), and QImage::textKeys().
*/
func (this*QImageReader) TextKeys() *qtcore.QStringList/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader8textKeysEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQStringListFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQStringList)
returnrv2
}
// /usr/include/qt/QtGui/qimagereader.h:96
// index:0
// Public Visibility=Default Availability=Available
// [8] QString text(const QString &) const
/*
Returns the image text associated with key.
Support for this option is implemented through QImageIOHandler::Description.
This function was introduced in Qt 4.1.
See also textKeys() and QImageWriter::setText().
*/
func (this*QImageReader) Text(keystring) string {
vartmpArg0=qtcore.NewQString5(key)
varconvArg0=tmpArg0.GetCthis()
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader4textERK7QString", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQStringFromPointer(unsafe.Pointer(uintptr(rv)))
rv3:=rv2.ToUtf8().Data()
qtcore.DeleteQString(rv2)
returnrv3
}
// /usr/include/qt/QtGui/qimagereader.h:98
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setClipRect(const QRect &)
/*
Sets the image clip rect (also known as the ROI, or Region Of Interest) to rect. The coordinates of rect are relative to the untransformed image size, as returned by size().
See also clipRect(), setScaledSize(), and setScaledClipRect().
*/
func (this*QImageReader) SetClipRect(rect qtcore.QRect_ITF) {
varconvArg0 unsafe.Pointer
ifrect!=nil&&rect.QRect_PTR() !=nil {
convArg0=rect.QRect_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader11setClipRectERK5QRect", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:99
// index:0
// Public Visibility=Default Availability=Available
// [16] QRect clipRect() const
/*
Returns the clip rect (also known as the ROI, or Region Of Interest) of the image. If no clip rect has been set, an invalid QRect is returned.
See also setClipRect().
*/
func (this*QImageReader) ClipRect() *qtcore.QRect/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader8clipRectEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQRectFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRect)
returnrv2
}
// /usr/include/qt/QtGui/qimagereader.h:101
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setScaledSize(const QSize &)
/*
Sets the scaled size of the image to size. The scaling is performed after the initial clip rect, but before the scaled clip rect is applied. The algorithm used for scaling depends on the image format. By default (i.e., if the image format does not support scaling), QImageReader will use QImage::scale() with Qt::SmoothScaling.
See also scaledSize(), setClipRect(), and setScaledClipRect().
*/
func (this*QImageReader) SetScaledSize(size qtcore.QSize_ITF) {
varconvArg0 unsafe.Pointer
ifsize!=nil&&size.QSize_PTR() !=nil {
convArg0=size.QSize_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader13setScaledSizeERK5QSize", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:102
// index:0
// Public Visibility=Default Availability=Available
// [8] QSize scaledSize() const
/*
Returns the scaled size of the image.
See also setScaledSize().
*/
func (this*QImageReader) ScaledSize() *qtcore.QSize/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader10scaledSizeEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQSizeFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQSize)
returnrv2
}
// /usr/include/qt/QtGui/qimagereader.h:104
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setQuality(int)
/*
Sets the quality setting of the image format to quality.
Some image formats, in particular lossy ones, entail a tradeoff between a) visual quality of the resulting image, and b) decoding execution time. This function sets the level of that tradeoff for image formats that support it.
In case of scaled image reading, the quality setting may also influence the tradeoff level between visual quality and execution speed of the scaling algorithm.
The value range of quality depends on the image format. For example, the "jpeg" format supports a quality range from 0 (low visual quality) to 100 (high visual quality).
This function was introduced in Qt 4.2.
See also quality() and setScaledSize().
*/
func (this*QImageReader) SetQuality(qualityint) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader10setQualityEi", qtrt.FFI_TYPE_POINTER, this.GetCthis(), quality)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:105
// index:0
// Public Visibility=Default Availability=Available
// [4] int quality() const
/*
Returns the quality setting of the image format.
This function was introduced in Qt 4.2.
See also setQuality().
*/
func (this*QImageReader) Quality() int {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader7qualityEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnqtrt.Cretval2go("int", rv).(int) // 1111
}
// /usr/include/qt/QtGui/qimagereader.h:107
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setScaledClipRect(const QRect &)
/*
Sets the scaled clip rect to rect. The scaled clip rect is the clip rect (also known as ROI, or Region Of Interest) that is applied after the image has been scaled.
See also scaledClipRect() and setScaledSize().
*/
func (this*QImageReader) SetScaledClipRect(rect qtcore.QRect_ITF) {
varconvArg0 unsafe.Pointer
ifrect!=nil&&rect.QRect_PTR() !=nil {
convArg0=rect.QRect_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader17setScaledClipRectERK5QRect", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:108
// index:0
// Public Visibility=Default Availability=Available
// [16] QRect scaledClipRect() const
/*
Returns the scaled clip rect of the image.
See also setScaledClipRect().
*/
func (this*QImageReader) ScaledClipRect() *qtcore.QRect/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader14scaledClipRectEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQRectFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRect)
returnrv2
}
// /usr/include/qt/QtGui/qimagereader.h:110
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setBackgroundColor(const QColor &)
/*
Sets the background color to color. Image formats that support this operation are expected to initialize the background to color before reading an image.
This function was introduced in Qt 4.1.
See also backgroundColor() and read().
*/
func (this*QImageReader) SetBackgroundColor(colorQColor_ITF) {
varconvArg0 unsafe.Pointer
ifcolor!=nil&&color.QColor_PTR() !=nil {
convArg0=color.QColor_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader18setBackgroundColorERK6QColor", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:111
// index:0
// Public Visibility=Default Availability=Available
// [16] QColor backgroundColor() const
/*
Returns the background color that's used when reading an image. If the image format does not support setting the background color an invalid color is returned.
This function was introduced in Qt 4.1.
See also setBackgroundColor() and read().
*/
func (this*QImageReader) BackgroundColor() *QColor/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader15backgroundColorEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=/*==*/NewQColorFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2/*==*/, DeleteQColor)
returnrv2
}
// /usr/include/qt/QtGui/qimagereader.h:113
// index:0
// Public Visibility=Default Availability=Available
// [1] bool supportsAnimation() const
/*
Returns true if the image format supports animation; otherwise, false is returned.
This function was introduced in Qt 4.1.
See also QMovie::supportedFormats().
*/
func (this*QImageReader) SupportsAnimation() bool {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader17supportsAnimationEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qimagereader.h:115
// index:0
// Public Visibility=Default Availability=Available
// [-2] QImageIOHandler::Transformations transformation() const
/*
Returns the transformation metadata of the image, including image orientation. If the format does not support transformation metadata QImageIOHandler::Transformation_None is returned.
This function was introduced in Qt 5.5.
See also setAutoTransform() and autoTransform().
*/
func (this*QImageReader) Transformation() int {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader14transformationEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnint(rv)
}
// /usr/include/qt/QtGui/qimagereader.h:117
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setAutoTransform(bool)
/*
Determines that images returned by read() should have transformation metadata automatically applied if enabled is true.
This function was introduced in Qt 5.5.
See also autoTransform(), transformation(), and read().
*/
func (this*QImageReader) SetAutoTransform(enabledbool) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader16setAutoTransformEb", qtrt.FFI_TYPE_POINTER, this.GetCthis(), enabled)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:118
// index:0
// Public Visibility=Default Availability=Available
// [1] bool autoTransform() const
/*
Returns true if the image handler will apply transformation metadata on read().
This function was introduced in Qt 5.5.
See also setAutoTransform(), transformation(), and read().
*/
func (this*QImageReader) AutoTransform() bool {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader13autoTransformEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qimagereader.h:120
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setGamma(float)
/*
This is an image format specific function that forces images with gamma information to be gamma corrected to gamma. For image formats that do not support gamma correction, this value is ignored.
To gamma correct to a standard PC color-space, set gamma to 1/2.2.
This function was introduced in Qt 5.6.
See also gamma().
*/
func (this*QImageReader) SetGamma(gammafloat32) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader8setGammaEf", qtrt.FFI_TYPE_POINTER, this.GetCthis(), gamma)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qimagereader.h:121
// index:0
// Public Visibility=Default Availability=Available
// [4] float gamma() const
/*
Returns the gamma level of the decoded image. If setGamma() has been called and gamma correction is supported it will return the gamma set. If gamma level is not supported by the image format, 0.0 is returned.
This function was introduced in Qt 5.6.
See also setGamma().
*/
func (this*QImageReader) Gamma() float32 {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader5gammaEv", qtrt.FFI_TYPE_DOUBLE, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnqtrt.Cretval2go("float32", rv).(float32) // 1111
}
// /usr/include/qt/QtGui/qimagereader.h:123
// index:0
// Public Visibility=Default Availability=Available
// [8] QByteArray subType() const
/*
Returns the subtype of the image.
This function was introduced in Qt 5.4.
*/
func (this*QImageReader) SubType() *qtcore.QByteArray/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader7subTypeEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQByteArrayFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQByteArray)
returnrv2
}
// /usr/include/qt/QtGui/qimagereader.h:126
// index:0
// Public Visibility=Default Availability=Available
// [1] bool canRead() const
/*
Returns true if an image can be read for the device (i.e., the image format is supported, and the device seems to contain valid data); otherwise returns false.
canRead() is a lightweight function that only does a quick test to see if the image data is valid. read() may still return false after canRead() returns true, if the image data is corrupt.
Note: A QMimeDatabase lookup is normally a better approach than this function for identifying potentially non-image files or data.
For images that support animation, canRead() returns false when all frames have been read.
See also read(), supportedImageFormats(), and QMimeDatabase.
*/
func (this*QImageReader) CanRead() bool {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader7canReadEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qimagereader.h:127
// index:0
// Public Visibility=Default Availability=Available
// [32] QImage read()
/*
Reads an image from the device. On success, the image that was read is returned; otherwise, a null QImage is returned. You can then call error() to find the type of error that occurred, or errorString() to get a human readable description of the error.
For image formats that support animation, calling read() repeatedly will return the next frame. When all frames have been read, a null image will be returned.
See also canRead(), supportedImageFormats(), supportsAnimation(), and QMovie.
*/
func (this*QImageReader) Read() *QImage/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader4readEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=/*==*/NewQImageFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2/*==*/, DeleteQImage)
returnrv2
}
// /usr/include/qt/QtGui/qimagereader.h:128
// index:1
// Public Visibility=Default Availability=Available
// [1] bool read(QImage *)
/*
Reads an image from the device. On success, the image that was read is returned; otherwise, a null QImage is returned. You can then call error() to find the type of error that occurred, or errorString() to get a human readable description of the error.
For image formats that support animation, calling read() repeatedly will return the next frame. When all frames have been read, a null image will be returned.
See also canRead(), supportedImageFormats(), supportsAnimation(), and QMovie.
*/
func (this*QImageReader) Read1(imageQImage_ITF/*777 QImage **/) bool {
varconvArg0 unsafe.Pointer
ifimage!=nil&&image.QImage_PTR() !=nil {
convArg0=image.QImage_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader4readEP6QImage", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qimagereader.h:130
// index:0
// Public Visibility=Default Availability=Available
// [1] bool jumpToNextImage()
/*
For image formats that support animation, this function steps over the current image, returning true if successful or false if there is no following image in the animation.
The default implementation calls read(), then discards the resulting image, but the image handler may have a more efficient way of implementing this operation.
See also jumpToImage() and QImageIOHandler::jumpToNextImage().
*/
func (this*QImageReader) JumpToNextImage() bool {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader15jumpToNextImageEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qimagereader.h:131
// index:0
// Public Visibility=Default Availability=Available
// [1] bool jumpToImage(int)
/*
For image formats that support animation, this function skips to the image whose sequence number is imageNumber, returning true if successful or false if the corresponding image cannot be found.
The next call to read() will attempt to read this image.
See also jumpToNextImage() and QImageIOHandler::jumpToImage().
*/
func (this*QImageReader) JumpToImage(imageNumberint) bool {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QImageReader11jumpToImageEi", qtrt.FFI_TYPE_POINTER, this.GetCthis(), imageNumber)
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qimagereader.h:132
// index:0
// Public Visibility=Default Availability=Available
// [4] int loopCount() const
/*
For image formats that support animation, this function returns the number of times the animation should loop. If this function returns -1, it can either mean the animation should loop forever, or that an error occurred. If an error occurred, canRead() will return false.
See also supportsAnimation(), QImageIOHandler::loopCount(), and canRead().
*/
func (this*QImageReader) LoopCount() int {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QImageReader9loopCountEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnqtrt.Cretval2go("int", rv).(int) // 1111
}
// /usr/include/qt/QtGui/qimagereader.h:133
// index:0
// Public Visibility=Default Availability=Available
// [4] int imageCount() const
/*
For image formats that support animation, this function returns the total number of images in the animation. If the format does not support animation, 0 is returned.
This function returns -1 if an error occurred.