Determine image dimensions

Determine image dimensions

Postby avista » Tue May 10, 2016 12:54 pm

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,
User avatar
avista
 
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Re: Determine image dimensions

Postby avista » Tue May 17, 2016 9:50 am

Anyone ?
User avatar
avista
 
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Re: Determine image dimensions

Postby Antonio Linares » Tue May 17, 2016 10:17 am

Here you have an example:

Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oImg

   DEFINE IMAGE oImg FILENAME "..\bitmaps\olga1.jpg"

   MsgInfo( oImg:nWidth )
   
   MsgInfo( oImg:nHeight )

   oImg:End()

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Determine image dimensions

Postby Antonio Linares » Tue May 17, 2016 10:25 am

To print it:

Code: Select all  Expand view
#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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 84 guests