Dear All,
I use below function to reduce image size and quality but I use multiple image (1000). This procedure consume memory almost 2Gb and got an error
"Unrecoverable error 90006 hb_xgrab can't allocate memory"
How to solve this issue? Thank you in advance.
I use below function to reduce image size and quality but I use multiple image (1000). This procedure consume memory almost 2Gb and got an error
"Unrecoverable error 90006 hb_xgrab can't allocate memory"
How to solve this issue? Thank you in advance.
*-----------------------------------*
FUNCTION SaveImage( cFile, cNewFile )
local oImage
local aImg, nQuality
nQuality := iif(filesize(cFile)>200000,15, iif(filesize(cFile)>150000, 20, 25 ))
if filesize(cFile) >= 32768 // 65536
oImage := GdiBmp():New( cFile )
oImage:Resize( oImage:GetWidth()/1.3, oImage:GetHeight()/1.3 )
oImage:Save( cNewFile )
oImage:End()
aImg := Fw_ReadImage( nil, cFile )
FW_SaveImage( aImg[ 1 ], cNewFile, nQuality )
PalBmpFree( aImg )
Memory( -1 )
end
Return nil
Regards,
Dutch
FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)