de wathsnew.txt
* New: function FIMakeThumbNail( cSrcFile, cDstFile, nPixel ) --> lOk thanks to
Carlos Vargas:
viewtopic.php?p=155418#p155418
* New: function FIMakeThumbNail( cSrcFile, cDstFile, nPixel ) --> lOk thanks to
Carlos Vargas:
viewtopic.php?p=155418#p155418
mastintin wrote:Respecto a esto tengo una buena noticia ...para eso no necesitamos FreeImage , por lo menos en 32bits....
en gdiplus.cpp :
HB_FUNC( GDIPLUSIMAGECREATETHUMB )
{
Bitmap * newImage = ( Bitmap * ) hb_parnl( 1 );
int nWidth = hb_parni( 2 );
int nHeight = hb_parni( 3 );
Image * hThumb = newImage->GetThumbnailImage( nWidth , nHeight, NULL, NULL );
hb_retnl( ( HB_LONG ) hThumb );
}
en Tgdiplus.prg :
METHOD CreateThumbnail( nWidth, nHeight ) CLASS GDIBmp
local oThumb:= gdiBmp():new()
local hImage := GdiPlusImageCreateThumb( ::hbmp, nWidth, nHeight )
oThumb:hBmp := hImage
Return oThumb
Function GDIPlusSaveThumbnail( cImageIni, cImageEnd , nWhidth, nHeight )
local cExtIni := Upper(cFileExt( cImageIni ))
local oImage:= GDIBmp():New( cImageIni )
local oThumb
local nScan
if( nScan:= aScan( oImage:aExtIni, cExtIni )) == 0
Msginfo( " el archivo "+ cImageIni + " tiene un formato no soportado")
return .f.
endif
oThumb:= oImage:CreateThumbmail( nWhidth, nHeight )
oThumb:Save( cImageEnd )
oImage:Destroy()
oThumb:Destroy()
return nil
Function GDIPlusSaveThumbnail( cImageIni, cImageEnd , nWhidth, nHeight )
local lSw := .T.
local cExtIni := Upper(cFileExt( cImageIni ))
local oImage:= GDIBmp():New( cImageIni )
local oThumb
local nScan
if( nScan:= aScan( oImage:aExtIni, cExtIni )) == 0
Msginfo( " el archivo "+ cImageIni + " tiene un formato no soportado")
//return .f.
lSw := .F.
else
oThumb:= oImage:CreateThumbmail( nWhidth, nHeight )
oThumb:Save( cImageEnd )
oImage:Destroy()
oThumb:Destroy()
endif
return lSw
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: cmsoft, Google [Bot] and 56 guests