-
Notifications
You must be signed in to change notification settings - Fork 1
/
fortran_libgd.f90
1460 lines (1278 loc) · 51 KB
/
fortran_libgd.f90
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
module fortran_libgd
use, intrinsic :: iso_c_binding
implicit none
type, bind(c):: gdPoint
integer(c_int):: x
integer(c_int):: y
end type gdPoint
type, bind(c):: gdRect
integer(c_int):: x
integer(c_int):: y
integer(c_int):: width
integer(c_int):: height
end type gdRect
integer(c_int), parameter :: gdArc = 0_c_int,&
gdPie = 0_c_int,&
gdChord = 1_c_int,&
gdNoFill = 2_c_int,&
gdEdged = 4_c_int,&
gdAlphaMax = 127_c_int,&
gdAlphaOpaque = 0_c_int,&
gdAlphaTransparent = 127_c_int,&
gdRedMax = 255_c_int,&
gdGreenMax = 255_c_int,&
gdBlueMax = 255_c_int,&
gdMaxColors = 255_c_int,&
gdEffectReplace = 0_c_int,&
gdEffectAlphaBlend = 1_c_int,&
gdEffectNormal = 2_c_int,&
gdEffectOverlay = 3_c_int,&
gdEffectMultiply = 4_c_int,&
GD_TRUE = 1_c_int,&
GD_FALSE = 0_c_int,&
gdStyled = -2_c_int,&
gdBrushed = -3_c_int,&
gdStyledBrushed = -4_c_int,&
gdTiled = -5_c_int,&
gdTransparent = -6_c_int,&
gdAntiAliased = -7_c_int,&
gdFTEX_LINESPACE = 1_c_int,&
gdFTEX_CHARMAP = 2_c_int,&
gdFTEX_RESOLUTION = 4_c_int,&
gdFTEX_DISABLE_KERNING = 8_c_int,&
gdFTEX_XSHOW = 16_c_int,&
gdFTEX_FONTPATHNAME = 32_c_int,&
gdFTEX_FONTCONFIG = 64_c_int,&
gdFTEX_RETURNFONTPATHNAME = 128_c_int,&
gdFTEX_Unicode = 0_c_int,&
gdFTEX_shift_JIS = 1_c_int,&
gdFTEX_Big5 = 2_c_int,&
gdFTEX_Adobe_Custom = 3_c_int,&
GD_CMP_IMAGE = 1_c_int,&
GD_CMP_NUM_COLORS = 2_c_int,&
GD_CMP_COLOR = 4_c_int,&
GD_CMP_SIZE_X = 8_c_int,&
GD_CMP_SIZE_Y = 16_c_int,&
GD_CMP_TRANSPARENT = 32_c_int,&
GD_CMP_BACKGROUND = 64_c_int,&
GD_CMP_INTERLACE = 128_c_int,&
GD_CMP_TRUECOLOR = 256_c_int,&
GD_RESOLUTION = 92_c_int
real(c_double), parameter:: GD_EPSILON = 1e-6_c_double,&
GD_M_PI = 3.14159265358979323846_c_double
! for gdInterpolationMethod
enum, bind (c)
enumerator:: GD_DEFAULT=0
enumerator:: GD_BELLL
enumerator:: GD_BESSEL
enumerator:: GD_BILINIEAR_FIXED
enumerator:: GD_BICUBIC
enumerator:: GD_BICUBIC_FIXED
enumerator:: GD_BLACKMAN
enumerator:: GD_BOX
enumerator:: GD_BSPLINE
enumerator:: GD_CATMULLROM
enumerator:: GD_GAUSSIAN
enumerator:: GD_GENERALIZED_CUBIC
enumerator:: GD_HERMITE
enumerator:: GD_HAMMING
enumerator:: GD_HANNING
enumerator:: GD_MITCHELL
enumerator:: GD_NEAREST_NEIGHBOUR
enumerator:: GD_POWER
enumerator:: GD_QUADRATIC
enumerator:: GD_SINC
enumerator:: GD_TRIANGLE
enumerator:: GD_WEIGHTED4
enumerator:: GD_LINEAR
enumerator:: GD_METHOD_COUNT=23
end enum
! for gdAffineStandardMatrix
enum, bind(c)
enumerator:: GD_AFFINE_TRANSLATE = 0
enumerator:: GD_AFFINE_SCALE
enumerator:: GD_AFFINE_ROTATE
enumerator:: GD_AFFINE_SHEAR_HORIZONTAL
enumerator:: GD_AFFINE_SHEAR_VERTICAL
end enum
! for gdPaletteQuantizationMethod
enum, bind(c)
enumerator:: GD_QUANT_DEFAUALT = 0
enumerator:: GD_QUANT_JQUANT = 1
enumerator:: GD_NEUQUANT = 2
enumerator:: GD_QUANT_LIQ =3
end enum
! Group: GifAnim
enum, bind(c)
enumerator:: gdDisposalUnknown
enumerator:: gdDisposalNone
enumerator:: gdDisposalRestoreBackground
enumerator:: gdDisposalRestorePrevious
end enum
!for gdCropMode
enum, bind(c)
enumerator:: GD_CROP_DEFAULT = 0
enumerator:: GD_CROP_TRANSPARENT
enumerator:: GD_CROP_BLACK
enumerator:: GD_CROP_WHITE
enumerator:: GD_CROP_SIDES
enumerator:: GD_CROP_THRESHOLD
end enum
interface
!===============================================================================
! Functions thet are _not_ part of libgd but of the standard C library,
! but still required to access the functionality of libgd.
function gd_fclose(filepointer)&
bind(c, name = 'fclose')
import:: c_ptr,c_int
implicit none
type(c_ptr), value :: filepointer
integer(c_int) :: gd_fclose
end function gd_fclose
function gd_fopen(filename, modus)&
bind(c, name = 'fopen')
import:: c_ptr, c_char
implicit none
type(c_ptr) :: gd_fopen
character(kind= c_char), intent(in) :: filename(*), modus(*)
end function gd_fopen
function gd_fflush(stream)&
bind(c, name = 'fflush')
import c_ptr, c_int
implicit none
integer(c_int):: gd_fflush
type(c_ptr), value :: stream
end function gd_fflush
function gd_popen(streamname, modus)&
bind(c, name = 'wrap_popen')
import c_ptr, c_char
implicit none
type(c_ptr):: gd_popen
character(kind= c_char), intent(in) :: streamname(*), modus(*)
end function gd_popen
function gd_pclose(pipe)&
bind(c, name = 'pclose')
import c_ptr, c_int
implicit none
integer(c_int):: gd_pclose
type(c_ptr), value:: pipe
end function gd_pclose
function gd_fwrite_rawdata_matrix(data, w,h , stream)&
bind(c, name= 'gd_fwrite_rawdata_matrix')
import c_size_t, c_ptr, c_int, c_int8_t
implicit none
integer(c_size_t):: gd_fwrite_rawdata_matrix
integer(c_int), value :: w, h
integer(c_int8_t):: data(*)
type(c_ptr), value:: stream
end function gd_fwrite_rawdata_matrix
function gd_fread_rawdata_matrix(data, w,h , stream)&
bind(c, name= 'gd_fread_rawdata_matrix')
import c_size_t, c_ptr, c_int8_t, c_int
implicit none
integer(c_size_t):: gd_fread_rawdata_matrix
integer(c_int), value :: w, h
integer(c_int8_t):: data(*)
type(c_ptr), value:: stream
end function gd_fread_rawdata_matrix
!==============================================================================
function gdAlphaBlend(dst, src)&
bind(c, name='gdAlphaBlend')
import c_int
implicit none
integer(c_int):: gdAlphaBlend
integer(c_int), value:: dst, src
end function gdAlphaBlend
function gdFontGetGiant()&
bind(c, name = 'gdFontGetGiant')
import c_ptr
implicit none
type(c_ptr) :: gdFontGetGiant
end function gdFontGetGiant
function gdFontGetLarge() bind(c, name = 'gdFontGetLarge')
import c_ptr
implicit none
type(c_ptr) :: gdFontGetLarge
end function gdFontGetLarge
function gdFontGetMediumBold()&
bind(c, name = 'gdFontGetMediumBold')
import c_ptr
implicit none
type(c_ptr) :: gdFontGetMediumBold
end function gdFontGetMediumBold
function gdFontGetSmall()&
bind(c, name = 'gdFontGetSmall')
import c_ptr
implicit none
type(c_ptr) :: gdFontGetSmall
end function gdFontGetSmall
function gdFontGetTiny()&
bind(c, name = 'gdFontGetTiny')
import c_ptr
implicit none
type(c_ptr) :: gdFontGetTiny
end function gdFontGetTiny
subroutine gdFontCacheShutdown() &
bind(c, name = 'gdFontCacheShutdown')
end subroutine gdFontCacheShutdown
subroutine gdImageArc (im, mx, my, w, h, a1, a2, color)&
bind(c, name = 'gdImageArc')
import c_int, c_ptr
implicit none
type(c_ptr) , value :: im
integer(c_int), value :: mx, my, w, h, a1, a2, color
end subroutine gdImageArc
function gdImageAlpha(im, c) &
bind(c, name = ' wrap_gdImageAlpha')
import c_int, c_ptr
implicit none
type(c_ptr), value :: im
integer(c_int), value :: c
integer(c_int) :: gdImageAlpha
end function gdImageAlpha
subroutine gdImageAlphaBlending(im, alphaBlendingArg) &
bind(c, name='gdImageAlphaBlending')
import c_ptr, c_int
implicit none
type(c_ptr), value:: im
integer(c_int):: alphaBlendingArg
end subroutine gdImageAlphaBlending
function gdImageBlue (im, c) &
bind(c, name = ' wrap_gdImageBlue')
import c_int, c_ptr
implicit none
type(c_ptr), value :: im
integer(c_int), value :: c
integer(c_int) :: gdImageBlue
end function gdImageBlue
subroutine gdImageBmp (im, filepointer, compression)&
bind(c, name = 'gdImageBmp')
import c_ptr, c_int
implicit none
type(c_ptr), value :: im
type(c_ptr), value :: filepointer
integer(c_int), value :: compression
end subroutine gdImageBmp
function gdImageBmpPtr(im, size, compression)&
bind(c, name = 'gdImageBmpPtr')
import c_ptr, c_int
implicit none
type(c_ptr) :: gdImageBmpPtr
type(c_ptr), value:: im
integer(c_int) :: size
integer (c_int), value :: compression
end function gdImageBmpPtr
function gdImageBoundsSafe(im, x, y)&
bind(c, name='gdImageBoundsSave')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageBoundsSafe
type(c_ptr), value:: im
integer(c_int), value:: x, y
end function gdImageBoundsSafe
function gdImageBrightness(src, brightness)&
bind(c, name='gdImageBrightness')
import c_int, c_ptr
implicit none
integer(c_int):: gdImageBrightness
type(c_ptr):: src
integer(c_int), value:: brightness
end function gdImageBrightness
subroutine gdImageChar(im,f, x, y, c, color)&
bind(c, name='gdImageChar')
import c_ptr, c_int
implicit none
type(c_ptr), value:: im, f
integer(c_int):: x, y, c, color
end subroutine gdImageChar
subroutine gdImageCharUp(im,f, x, y, c, color)&
bind(c, name='gdImageCharUp')
import c_ptr, c_int
implicit none
type(c_ptr), value:: im, f
integer(c_int):: x, y, c, color
end subroutine gdImageCharUp
function gdImageColorAllocate (im, r, g, b)&
bind(c, name = 'gdImageColorAllocate')
import c_int, c_ptr
implicit none
integer(c_int) :: gdImageColorAllocate
type(c_ptr), value :: im
integer(c_int), value :: r, g, b
end function gdImageColorAllocate
function gdImageColorAllocateAlpha (im, r, g, b, a)&
bind(c, name = 'gdImageColorAllocateAlpha')
import c_int, c_ptr
implicit none
integer(c_int) :: gdImageColorAllocateAlpha
type(c_ptr), value :: im
integer(c_int), value :: r, g, b, a
end function gdImageColorAllocateAlpha
function gdImageColorReplace (im, src, dst)&
bind(c, name='gdImageColorReplace')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageColorReplace
type(c_ptr), value:: im
integer(c_int):: src, dst
end function gdImageColorReplace
function gdImageColorReplaceThreshold (im, src, dst, threshold)&
bind(c, name='gdImageColorReplaceThreshold')
import c_ptr, c_int, c_float
implicit none
integer(c_int):: gdImageColorReplaceThreshold
type(c_ptr), value:: im
integer(c_int), value:: src, dst
real(c_float), value:: threshold
end function gdImageColorReplaceThreshold
function gdImageColorReplaceArray (im, len, src, dst)&
bind(c, name='gdImageColorReplaceArray')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageColorReplaceArray
type(c_ptr), value:: im
integer(c_int), value::len
integer(c_int) :: src(*), dst(*)
end function gdImageColorReplaceArray
function gdImageClone(src) bind(c, name = 'gdImageClone')
import c_ptr, c_int
implicit none
type(c_ptr):: gdImageClone
type(c_ptr), value:: src
end function gdImageClone
function gdImageColor(src, red, green, blue, alpha)&
bind(c, name='gdImageColor')
import c_int, c_ptr
implicit none
integer(c_int) :: gdImageColor
type(c_ptr), value :: src
integer(c_int), value:: red, green, blue, alpha
end function gdImageColor
function gdImageColorClosest(im, r, g, b )&
bind(c, name='gdImageColorClosest')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageColorClosest
type(c_ptr), value:: im
integer(c_int), value:: r,g,b
end function gdImageColorClosest
function gdImageColorClosestAlpha(im, r, g, b, a)&
bind(c, name='gdImageColorClosestAlpha')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageColorClosestAlpha
type(c_ptr), value:: im
integer(c_int), value:: r,g,b,a
end function gdImageColorClosestAlpha
function gdImageColorClosestHWB(im, r, g, b)&
bind(c, name='gdImageColorClosestHWB')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageColorClosestHWB
type(c_ptr), value:: im
integer(c_int), value:: r,g,b
end function gdImageColorClosestHWB
subroutine gdImageColorDeallocate(im, color)&
bind(c, name='gdImageColorDeallocate')
import c_ptr, c_int
implicit none
type(c_ptr), value:: im
integer(c_int), value:: color
end subroutine gdImageColorDeallocate
function gdImageColorExact(im, r, g, b)&
bind(c, name='gdImageColorExact')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageColorExact
type(c_ptr), value:: im
integer(c_int):: r, g, b
end function gdImageColorExact
function gdImageColorExactAlpha(im, r, g, b)&
bind(c, name='gdImageColorExact')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageColorExactAlpha
type(c_ptr), value:: im
integer(c_int):: r, g, b
end function gdImageColorExactAlpha
function gdImageColorResolve(im, r, g, b)&
bind(c, name ='gdImageColorResolve')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageColorResolve
type(c_ptr), value:: im
integer(c_int), value:: r, g, b
end function gdImageColorResolve
function gdImageColorResolveAlpha(im, r, g, b, a)&
bind(c, name='gdImageColorResolveAlpha')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageColorResolveAlpha
type(c_ptr), value:: im
integer(c_int), value:: r, g, b, a
end function gdImageColorResolveAlpha
function gdImageColorsTotal (im) &
bind(c, name = 'wrap_gdImageColorsTotal')
import c_int, c_ptr
implicit none
type(c_ptr), value :: im
integer(c_int) :: gdImageColorsTotal
end function gdImageColorsTotal
!!$ subroutine gdImageColorTransparent &
!!$ bind(c, name = 'gdImageColorTransparent')
!!$ import c_int, c_ptr
!!$ type(c_ptr), value:: im
!!$ integer(c_int), value:: color
!!$ end subroutine gdImageColorTransparent
function gdImageCompare(im1, im2)&
bind(c, name='gdImageCompare')
import c_int, c_ptr
implicit none
integer(c_int)::gdImageCompare
type(c_ptr), value:: im1, im2
end function gdImageCompare
function gdImageContrast(src, contrast)&
bind(c, name='gdImageContrast')
import c_int, c_double, c_ptr
implicit none
integer(c_int):: gdImageContrast
type(c_ptr), value:: src
real(c_double), value:: contrast
end function gdImageContrast
!!$ function gdImageConvolution(src, filter, filter_div, offset)&
!!$ bind(c, name='gdImageConvolution')
!!$ import c_int, c_float, c_ptr
!!$ implicit none
!!$ integer(c_int):: gdImageConvolution
!!$ type(c_ptr):: src
!!$ real(c_float), value:: filter(0:3)
!!$ real(c_float), value:: filter_div, offset
!!$ end function gdImageConvolution
subroutine gdImageCopy(dst, src, dstX, dstY, srcX, srcY, w, h)&
bind(c, name = 'gdImageCopy')
import c_ptr, c_int
implicit none
type(c_ptr), value :: dst, src
integer(c_int), value :: dstX, dstY, srcX, srcY, w ,h
end subroutine gdImageCopy
function gdImageCopyGaussianBlurred(src, radius, sigma) &
bind(c, name='gdImageCopyGaussianBlurred')
import c_int, c_double, c_ptr
implicit none
integer(c_int):: gdImageCopyGaussianBlurred
type(c_ptr), value:: src
integer(c_int), value:: radius
real(c_double), value:: sigma
end function gdImageCopyGaussianBlurred
subroutine gdImageCopyMerge(dst, src, dstX, dstY, srcX, srcY, w, h, pct)&
bind(c, name = 'gdImageCopyMerge')
import c_ptr, c_int
implicit none
type(c_ptr), value:: dst, src
integer(c_int), value :: dstX, dstY, srcX, srcY, w ,h, pct
end subroutine gdImageCopyMerge
subroutine gdImageCopyMergeGrey(dst, src, dstX, dstY, srcX, srcY, w, h, pct)&
bind(c, name = 'gdImageCopyMergeGrey')
import c_ptr, c_int
implicit none
type(c_ptr), value:: dst, src
integer(c_int), value :: dstX, dstY, srcX, srcY, w ,h, pct
end subroutine gdImageCopyMergeGrey
subroutine gdImageCopyResampled(dst, src, dstX, dstY, srcX, srcY,&
srcW, srcH, angle) &
bind(c, name='gdImageCopyResampled')
import c_ptr, c_int
implicit none
type(c_ptr):: dst, src
integer(c_int):: dstX, dstY, srcX, srcY,srcW, srcH, angle
end subroutine gdImageCopyResampled
subroutine gdImageCopyResized(dst, src, dstX, dstY, srcX, srcY,&
dstW, dstH, srcW, srcH) &
bind(c, name = 'gdImageCopyResized')
import c_ptr, c_int
implicit none
type(c_ptr), value:: dst, src
integer(c_int), value :: dstX, dstY,srcX, srcY, dstW, dstH, srcW, srcH
end subroutine gdImageCopyResized
subroutine gdImageCopyRotated(dst, src, dstX, dstY, srcX, srcY, srcWidth,&
srcHeight, angle) &
bind(c, name='gdImageCopyRotated')
import c_int, c_ptr, c_double
implicit none
type(c_ptr), value:: dst, src
real(c_double), value:: dstX, dstY
integer(c_int), value:: srcX, srcY, srcWidth, srcHeight, angle
end subroutine gdImageCopyRotated
function gdImageCreate(xsize, ysize) bind(c, name = 'gdImageCreate')
import:: c_ptr, c_int
implicit none
type(c_ptr) :: gdImageCreate
integer(c_int), value :: xsize, ysize
end function gdImageCreate
function gdImageCreateFromBmp(inFile) &
bind(c, name = 'gdImageCreateFromBmp')
import c_ptr, c_char
implicit none
type(c_ptr) :: gdImageCreateFromBmp
type(c_ptr), value :: inFile
end function gdImageCreateFromBmp
function gdImageCreateFromBmpPtr(size, data) &
bind(c, name = 'gdImageCreateFromBmpPtr')
import c_ptr, c_int
implicit none
type(c_ptr) :: gdImageCreateFromBmpPtr
integer(c_int), value:: size
type(c_ptr), value ::data
end function gdImageCreateFromBmpPtr
function gdImageCreateFromFile(filename) &
bind(c, name = 'gdImageCreateFromFile')
import c_ptr, c_char
implicit none
type(c_ptr) :: gdImageCreateFromFile
character(kind= c_char), intent(in) :: filename(*)
end function gdImageCreateFromFile
function gdImageCreateFromGif(fdFile) &
bind(c, name = 'gdImageCreateFromGif')
import c_ptr, c_char
implicit none
type(c_ptr) :: gdImageCreateFromGif
type(c_ptr), value:: fdFile
end function gdImageCreateFromGif
function gdImageCreateFromGifPtr(size, data) &
bind(c, name = 'gdImageCreateFromGif')
import c_ptr, c_int, c_char
implicit none
type(c_ptr) :: gdImageCreateFromGifPtr
integer(c_int), value:: size
character(c_char):: data(*)
end function gdImageCreateFromGifPtr
function gdImageCreateFromPng(fdFile) &
bind(c, name = 'gdImageCreateFromPng')
import c_ptr, c_char
implicit none
type(c_ptr) :: gdImageCreateFromPng
type(c_ptr), value:: fdFile
end function gdImageCreateFromPng
function gdImageCreateFromTiff(fdFile) &
bind(c, name = 'gdImageCreateFromTiff')
import c_ptr, c_char
implicit none
type(c_ptr) :: gdImageCreateFromTiff
type(c_ptr), value:: fdFile
end function gdImageCreateFromTiff
function gdImageCreateFromTiffPtr(size, data) &
bind(c, name = 'gdImageCreateFromTiffPtr')
import c_ptr, c_int
implicit none
type(c_ptr):: gdImageCreateFromTiffPtr
integer(c_int), value :: size
type(c_ptr), value:: data
end function gdImageCreateFromTiffPtr
function gdImageCreatePaletteFromTrueColor(im, dither, colorsWanted)&
bind(c, name = 'gdImageCreatePaletteFromTrueColor')
import c_int, c_ptr
implicit none
integer(c_int):: gdImageCreatePaletteFromTrueColor
type(c_ptr), value :: im
integer(c_int), value:: dither, colorsWanted
end function gdImageCreatePaletteFromTrueColor
function gdImageCreateTrueColor(xsize, ysize)&
bind(c, name = 'gdImageCreateTrueColor')
import:: c_ptr, c_int
implicit none
type(c_ptr) :: gdImageCreateTrueColor
integer(c_int), value :: xsize, ysize
end function gdImageCreateTrueColor
function gdImageCrop(src, crop)&
bind(c, name='gdImageCrop')
import:: c_ptr, gdRect
implicit none
type(c_ptr):: gdImageCrop
type(c_ptr), value:: src
type(gdRect):: crop
end function gdImageCrop
function gdImageCropAuto(im, mode)&
bind(c, name='gdImageCropAuto')
import:: c_ptr, c_int, gdImageCrop
implicit none
type(c_ptr):: gdImageCropAuto
type(c_ptr), value:: im
integer(c_int), value:: mode
end function gdImageCropAuto
function gdImageCropThreshold(im, color, threshold)&
bind(c, name='gdImageCropThreshold')
import:: c_ptr, c_float, c_int
implicit none
type(c_ptr):: gdImageCropThreshold
type(c_ptr), value:: im
integer(c_int), value:: color
real(c_float), value:: threshold
end function gdImageCropThreshold
subroutine gdImageDashedLine (im, x1, y1, x2, y2, color)&
bind(c, name = 'gdImageDashedLine')
import c_int, c_ptr
implicit none
type(c_ptr) , value :: im
integer(c_int), value :: x1, y1, x2, y2, color
end subroutine gdImageDashedLine
subroutine gdImageDestroy(im) bind(c, name = 'gdImageDestroy')
import:: c_ptr
implicit none
type(c_ptr), value :: im
end subroutine gdImageDestroy
function gdImageEdgeDetectQuick(src) &
bind(c, name='gdImageEdgeDetectQuick')
import c_int, c_ptr
implicit none
integer(c_int):: gdImageEdgeDetectQuick
type(c_ptr), value:: src
end function gdImageEdgeDetectQuick
subroutine gdImageEllipse (im, mx, my, w, h, color) bind(c, name = 'gdImageEllipse')
import c_int, c_ptr
implicit none
type(c_ptr) , value :: im
integer(c_int), value :: mx, my, w, h, color
end subroutine gdImageEllipse
function gdImageEmboss(src) &
bind(c, name='gdImageEmboss')
import c_int, c_ptr
implicit none
integer(c_int):: gdImageEmboss
type(c_ptr), value:: src
end function gdImageEmboss
function gdImageFile(im, filename)&
bind(c, name='gdImageFile')
import c_char, c_int, c_ptr
implicit none
integer(c_int):: gdImageFile
type(c_ptr), value:: im
character(c_char), intent(in) :: filename
end function gdImageFile
subroutine gdImageFill (im, x,y , color) bind(c, name = 'gdImageFill')
import c_int, c_ptr
implicit none
type(c_ptr) , value :: im
integer(c_int), value :: x,y , color
end subroutine gdImageFill
subroutine gdImageFilledArc (im, mx, my, w, h, a1, a2, color, s)&
bind(c, name = 'gdImageFilledArc')
import c_int, c_ptr
implicit none
type(c_ptr) , value :: im
integer(c_int), value :: mx, my, w, h, a1, a2, color,s
end subroutine gdImageFilledArc
subroutine gdImageFilledEllipse (im, mx, my, w, h, color)&
bind(c, name = 'gdImageFilledEllipse')
import c_int, c_ptr
implicit none
type(c_ptr) , value :: im
integer(c_int), value :: mx, my, w, h, color
end subroutine gdImageFilledEllipse
subroutine gdImageFilledPolygon(im, p, n, c)&
bind(c, name=' gdImageFilledPolygon')
import c_ptr, c_int, gdPoint
implicit none
type(c_ptr), value:: im
type(gdPoint):: p(*)
integer(c_int), value:: n, c
end subroutine gdImageFilledPolygon
subroutine gdImageFilledRectangle (im, x1, y1, x2, y2, color)&
bind(c, name = 'gdImageFilledRectangle')
import c_int, c_ptr
implicit none
type(c_ptr) , value :: im
integer(c_int), value :: x1, y1, x2, y2, color
end subroutine gdImageFilledRectangle
subroutine gdImageFlipVertical(im)&
bind(c, name ='gdImageFlipVertical')
import c_ptr
implicit none
type(c_ptr):: im
end subroutine gdImageFlipVertical
subroutine gdImageFlipHorizontal(im)&
bind(c, name ='gdImageFlipHorizontal')
import c_ptr
implicit none
type(c_ptr):: im
end subroutine gdImageFlipHorizontal
subroutine gdImageFlipBoth(im)&
bind(c, name ='gdImageFlipBoth')
import c_ptr
implicit none
type(c_ptr):: im
end subroutine gdImageFlipBoth
function gdImageGaussianBlur(src) &
bind(c, name='gdImageGaussianBlur')
import c_int, c_ptr
implicit none
integer(c_int):: gdImageGaussianBlur
type(c_ptr), value:: src
end function gdImageGaussianBlur
function gdImageGetInterlaced (im) &
bind(c, name = 'wrap_gdImageGetInterlaced')
import c_int, c_ptr
implicit none
type(c_ptr), value :: im
integer(c_int) :: gdImageGetInterlaced
end function gdImageGetInterlaced
function gdImageGetPixel(im, x, y)&
bind(c, name = 'gdImageGetPixel')
import c_ptr, c_int
implicit none
integer(c_int) :: gdImageGetPixel
type(c_ptr):: im
integer(c_int), value:: x,y
end function gdImageGetPixel
function gdImageGetTrueColorPixel (im, x, y)&
bind(c, name = 'gdImageGetTrueColorPixel')
import c_ptr, c_int
implicit none
integer(c_int):: gdImageGetTrueColorPixel
type(c_ptr), value:: im
integer(c_int), value :: x,y
end function gdImageGetTrueColorPixel
subroutine gdImageGif (im, outFile)&
bind(c, name='gdImageGif')
import c_ptr
implicit none
type(c_ptr), value:: im, outFile
end subroutine gdImageGif
subroutine gdImageGifAnimAdd(im, outFile, LocalCM, LeftOfs, TopOfs, Delay, Disposal, previm)&
bind(c, name='gdImageGifAnimAdd')
import c_ptr, c_int
implicit none
type(c_ptr), value:: im, outFile, previm
integer(c_int), value:: LocalCM, LeftOfs, TopOfs, Delay, Disposal
end subroutine gdImageGifAnimAdd
subroutine gdImageGifAnimAddPtr(im, size, LocalCM, LeftOfs, TopOfs, Delay, Disposal, previm)&
bind(c, name='gdImageGifAnimAddPtr')
import c_ptr, c_int
implicit none
type(c_ptr), value:: im, previm
integer(c_int) :: size
integer(c_int), value:: LocalCM, LeftOfs, TopOfs, Delay, Disposal
end subroutine gdImageGifAnimAddPtr
subroutine gdImageGifAnimBegin(im, outFile, GlobalCM, Loops)&
bind(c, name='gdImageGifAnimBegin')
import c_ptr, c_int
implicit none
type(c_ptr), value:: im, outFile
integer(c_int), value:: GlobalCM, Loops
end subroutine gdImageGifAnimBegin
function gdImageAnimBeginPtr(im, size, GlobalCM, Loops)&
bind(c, name='gdImageAnimBeginPtr')
import c_ptr, c_char, c_int
implicit none
type(c_ptr):: gdImageAnimBeginPtr
type(c_ptr), value:: im
integer(c_int):: size
integer(c_int), value :: GlobalCM, Loops
end function gdImageAnimBeginPtr
subroutine gdImageGifAnimEnd(outFile)&
bind(c, name='gdImageGifAnimEnd')
import c_ptr
implicit none
type(c_ptr), value:: outFile
end subroutine gdImageGifAnimEnd
function gdImageGifPtr(im, size)&
bind(c, name = 'gdImageGifPtr')
import c_ptr, c_int
implicit none
type(c_ptr) :: gdImageGifPtr
type(c_ptr), value:: im
integer(c_int) :: size
end function gdImageGifPtr
function gdImageGrayScale(src)&
bind(c, name='gdImageGrayScale')
import c_int, c_ptr
implicit none
integer(c_int):: gdImageGrayScale
type(c_ptr), value :: src
end function gdImageGrayScale
function gdImageGreen (im, c) &
bind(c, name = ' wrap_gdImageGreen')
import c_int, c_ptr
implicit none
type(c_ptr), value :: im
integer(c_int), value :: c
integer(c_int) :: gdImageGreen
end function gdImageGreen
subroutine gdImageInterlace(im, interlaceArg)&
bind(c, name='gdImageInterlace')
import c_ptr, c_int
implicit none
type(c_ptr), value:: im
integer(c_int), value :: interlaceArg
end subroutine gdImageInterlace
subroutine gdImageJpeg (im, filepointer, quality) bind(c, name = 'gdImageJpeg')
import c_ptr, c_int
implicit none
type(c_ptr), value :: im
type(c_ptr), value :: filepointer
integer(c_int), value :: quality
end subroutine gdImageJpeg
subroutine gdImageLine (im, x1, y1, x2, y2, color) bind(c, name = 'gdImageLine')
import c_int, c_ptr
implicit none
type(c_ptr) , value :: im
integer(c_int), value :: x1, y1, x2, y2, color
end subroutine gdImageLine
function gdImageMeanRemoval(src) &
bind(c, name='gdImageMeanRemoval')
import c_int, c_ptr
implicit none
integer(c_int):: gdImageMeanRemoval
type(c_ptr), value:: src
end function gdImageMeanRemoval
function gdImageNegate(src)&
bind(c, name='gdImageNegate')
import c_int, c_ptr
implicit none
integer(c_int):: gdImageNegate
type(c_ptr), value:: src
end function gdImageNegate
function gdImageNeuQuant(im, max_color, sample_factor)&
bind(c, name='gdImageNeuQuant')
import c_int, c_ptr
implicit none
type(c_ptr) :: gdImageNeuQuant
type(c_ptr), value:: im
integer(c_int), value:: max_color, sample_factor
end function gdImageNeuQuant
subroutine gdImageOpenPolygon(im, p, n, c)&
bind(c, name=' gdImageOpenPolygon')
import c_ptr, c_int, gdPoint
implicit none
type(c_ptr), value:: im
type(gdPoint):: p(*)
integer(c_int), value:: n, c
end subroutine gdImageOpenPolygon
subroutine gdImagePaletteCopy(to, from) &
bind(c, name='gdImagePaletteCopy')
import c_int, c_ptr
implicit none
type(c_ptr), value:: to, from
end subroutine gdImagePaletteCopy
function gdImagePalettePixel (im,x,y) &
bind(c, name = 'wrap_gdImagePalettePixel')
import c_int, c_ptr
implicit none
type(c_ptr), value :: im
integer(c_int), value:: x,y
integer(c_int) :: gdImagePalettePixel
end function gdImagePalettePixel
function gdImagePixelate(im, block_size, mode)&
bind(c, name='gdImagePixelate')
import c_int, c_ptr
implicit none
integer(c_int):: gdImagePixelate
type(c_ptr), value:: im
integer(c_int), value :: block_size, mode
end function gdImagePixelate
subroutine gdImagePng (im, filepointer)&
bind(c, name = 'gdImagePng')
import c_ptr
implicit none
type(c_ptr), value :: im
type(c_ptr), value :: filepointer
end subroutine gdImagePng
subroutine gdImagePolygon(im, p, n, c)&
bind(c, name=' gdImagePolygon')