Jpg Height and Width?
Posted: Sat Jan 14, 2006 5:43 pm
Hi fw's,
is possible to know the dimensions (Height and Width) of an Jpg with Fwh?
is possible to know the dimensions (Height and Width) of an Jpg with Fwh?
www.FiveTechSoft.com
https://fivetechsoft.com/forums/
Enrico,EnricoMaria wrote:Load it in a TImage control and then use nHeight() and nWidth() methods.
Enrico,EnricoMaria wrote:Load it in a TImage control and then use nHeight() and nWidth() methods.
Code: Select all
oImg := TImage():Define( , cImage, oDlg )
nHorDim := oImg:nWidth()
nVerDim := oImg:nHeight()
oImg := Nil // is correct for release the lib?
MsgInfo( "Altezza " + cValToChar( nVerDim ) + CRLF +;
"Larghezza " + cValToChar( nHorDim ), "" )
Code: Select all
oImg := Nil
Code: Select all
#include "Fivewin.ch"
STATIC hLib
FUNCTION MAIN()
LOCAL oDlg, oImg
DEFINE DIALOG oDlg
@ 0, 1 BUTTON "Sizes" ACTION SHOWSIZES( oDlg )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
STATIC FUNCTION SHOWSIZES( oDlg )
LOCAL oImg := TImage():Define( , "SFONDO.JPG", oDlg )
? oImg:nWidth(), oImg:nHeight()
oImg:End()
RETURN NIL
No, you need oImg:End() or RELEASE IMAGE oImg.Ugo wrote:Code: Select all
oImg := Nil
is correct to release the lib?
Enrico,EnricoMaria wrote:This is a working sample:
...
EnricoMaria wrote:No, you need oImg:End() or RELEASE IMAGE oImg.
Which cases? Can I reproduce the problem? How?Ugo wrote:Enrico,EnricoMaria wrote:This is a working sample:
...
work but in any case return 0 and 0
it is correct?
Yes, the case is the jpg create from my camera!EnricoMaria wrote:Which cases? Can I reproduce the problem? How?