Hi fw's,
is possible to know the dimensions (Height and Width) of an Jpg with Fwh?
EnricoMaria wrote:Load it in a TImage control and then use nHeight() and nWidth() methods.
EnricoMaria wrote:Load it in a TImage control and then use nHeight() and nWidth() methods.
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 ), "" )
oImg := Nil
#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
Ugo wrote:
- Code: Select all Expand view
oImg := Nil
is correct to release the lib?
EnricoMaria wrote:This is a working sample:
...
EnricoMaria wrote:No, you need oImg:End() or RELEASE IMAGE oImg.
Ugo wrote:EnricoMaria wrote:This is a working sample:
...
Enrico,
work but in any case return 0 and 0
it is correct?
EnricoMaria wrote:Which cases? Can I reproduce the problem? How?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 89 guests