I cannot find how to resize JPG images when loading them from disk to fit them in a dialog (to use in the new TCoverFlow class):
- Code: Select all Expand view
- FOR i=1 TO my_var
IF !(client->(DBSEEK(PADR(ALLTRIM(UPPER(CFileNoExt(aFolder[i]))),14,' '))))
cTexto[1]:="No reference"
ELSE
cTexto[1]:="Ref. : "+client->code
ENDIF
oImage:LOADIMAGE(, aFolder[i])
oImage:Resize(oImage:nWidth()/.5,oImage:nHeight()/.5) //DOES NOT WORK !!!!!!!!!!
hBMP:= oImage:hBitmap
oCF:AddCoverH( hBMP, cTexto[1], CLR_YELLOW )
NEXT i
oDiap:oClient = oCF
ACTIVATE DIALOG oDiap CENTERED ON INIT ( oCF:Resize(), oCF:Refresh() )
Any ideas on how to resize using the FreeImage library methods and variables?
I also need to mention that when TCoverFlow is displayed on a WIndow it works Ok but when it is on a child Dialog it is at least 50 % slower.
Emiliano Llano Díaz