Page 1 of 1
Determine image dimensions
Posted: Tue May 10, 2016 12:54 pm
by avista
Hi all,
Please for solution how to determine dimensions of image (.jpg) file
and what is the best way to print image (i use fwh 14.12)
Best regards,
Re: Determine image dimensions
Posted: Tue May 17, 2016 9:50 am
by avista
Anyone ?
Re: Determine image dimensions
Posted: Tue May 17, 2016 10:17 am
by Antonio Linares
Here you have an example:
Code: Select all
#include "FiveWin.ch"
function Main()
local oImg
DEFINE IMAGE oImg FILENAME "..\bitmaps\olga1.jpg"
MsgInfo( oImg:nWidth )
MsgInfo( oImg:nHeight )
oImg:End()
return nil
Re: Determine image dimensions
Posted: Tue May 17, 2016 10:25 am
by Antonio Linares
To print it:
Code: Select all
#include "FiveWin.ch"
function Main()
local oImg, oPrn
DEFINE IMAGE oImg FILENAME "..\bitmaps\olga1.jpg"
PRINT oPrn NAME "Test" PREVIEW
PAGE
oPrn:SayImage( 0, 0, oImg, oImg:nWidth * 4, oImg:nHeight * 4 )
ENDPAGE
ENDPRINT
oImg:End()
return nil