As I am using clarion 6.3 and it does not support PNG display. I tried using the FreeImage examples (because I did not find a documentation for using clarion with FreeImage ) but there was always a problem with aspect ratio or the height and width which exceed the control limits.
PROGRAM
INCLUDE('gdiplus.inc'), ONCE
MAP
END
Window WINDOW('PNG image in C6'),AT(,,208,120),CENTER,GRAY,SYSTEM
IMAGE,AT(9,14,64,59),USE(?IMAGE1)
END
bm TGdiPlusBitmap
sBits &STRING, AUTO
CODE
OPEN(Window)
bm.FromFile('CristmasTree.png')
sBits &= bm.ToString('image/bmp')
?IMAGE1{PROP:ImageBits} = sBits
DISPOSE(sBits)
ACCEPT
END
Gets the width, in pixels, of this image.
GetWidth PROCEDURE(), ULONG
!!!Gets the height, in pixels, of this image.
GetHeight PROCEDURE(), ULONG
!!!Gets the horizontal resolution, in dots per inch, of this image.
GetHorizontalResolution PROCEDURE(), SREAL
!!!Gets the vertical resolution, in dots per inch, of this image.
GetVerticalResolution PROCEDURE(), SREAL
!Clone PROCEDURE(), *TGdiPlusImage
!ToFile PROCEDURE(STRING pFileName), GpStatus, PROC
!GetType PROCEDURE(), GpImageType
!GetPhysicalDimension PROCEDURE(*GpSizeF pSize), GpStatus, PROC
!GetBounds PROCEDURE(*GpRectF pRect, *GpUnit pUnit), GpStatus, PROC
END
TGdiPlusBitmap CLASS(TGdiPlusImage), TYPE, MODULE(‘gdiplus.clw’), LINK(‘gdiplus.clw’)
GetHBITMAP PROCEDURE(ULONG pBackground), HBITMAP
END