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,
Determine image dimensions
- Antonio Linares
- Site Admin
- Posts: 42809
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 122 times
- Been thanked: 117 times
- Contact:
Re: Determine image dimensions
Here you have an example:
Code: Select all | Expand
#include "FiveWin.ch"function Main() local oImg DEFINE IMAGE oImg FILENAME "..\bitmaps\olga1.jpg" MsgInfo( oImg:nWidth ) MsgInfo( oImg:nHeight ) oImg:End()return nil
- Antonio Linares
- Site Admin
- Posts: 42809
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 122 times
- Been thanked: 117 times
- Contact:
Re: Determine image dimensions
To print it:
Code: Select all | Expand
#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