#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL cSrcImage := "c:\fwh\bitmaps\magic.bmp"
LOCAL cDstImage := "magic.gif"
LOCAL oGdi := GDIBmp():New( cSrcImage )
oGdi:Save( cDstImage )
oGdi:End()
RETURN NIL
mastintin wrote:go to gdi1.0 to GDI 1.1 and some operating systems let out (not good).
Enrico Maria Giordano wrote:mastintin wrote:go to gdi1.0 to GDI 1.1 and some operating systems let out (not good).
What Windows versions support GDI+ 1.1 natively?
EMG
mastintin wrote:more news...
https://msdn.microsoft.com/en-us/library/aa479306.aspx
I guess you can adapt the code. When you have a little time I look at you could do.
METHOD Save( cFile , nQuality ) CLASS GDIBmp
local cExtension := Upper(cFileExt(cFile))
local cCLSID
local hQuality := nil
local nScan:= aScan( ::aExtEnd, cExtension )
//local cGUI := AnsiToWide("{1D5BE4B5-FA4A-452D-9CDD-5DB35105E7EB}" )
local cTempFile
if nScan == 0
msginfo( "Formato no soportado" )
Return .f.
endif
if cExtension == "GIF"
nScan := 1
endif
cCLSID := ::aCLSID[ nScan ]
cCLSID = AnsiToWide( cCLSID )
cFile = AnsiToWide( cFile )
if cExtension == "GIF"
cTempFile := cTempFile()
GdiPlusImageSave( ::hBmp, cTempFile, cCLSID )
FIConvertImageFile( cTempFile, cFile )
FErase( cTempFile )
else
if !Empty( nQuality ) .and. cExtension == "JPG"
GdiPlusImageSaveQuality( ::hBmp, cFile, cCLSID, nQuality )
else
GdiPlusImageSave( ::hBmp, cFile, cCLSID )
endif
endif
Return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 90 guests