Page 1 of 1

Problem to convert Image file (fw_saveImage() )

Posted: Wed Feb 20, 2019 9:22 am
by Silvio.Falconi
I have pngs files and I must use a combobox .

After Uwe's advice, I used features created by Nages Rao to converte Image file into BMP
the problem before was the size of Images but Now I set all Images to 72 X 72


Code: Select all | Expand

Local  cFoldertemp:=".\bitmaps\mini\temp\"
Local aServiziBmp:= {}
Local cFileBmp_Servizi:= "
TempSe_"

 For n= 1 to Len(aservizi)
         Converti_Immagine_Bmp(alltrim(aServizi [n][2]),cFolderTemp,cFileBmp_Servizi+alltrim(str(n)),0.50)
         aadd(aServiziBmp,cFolderTemp+cFileBmp_Servizi+alltrim(str(n))+"
.Bmp"   )
       next

//-------------------------------------------------------------------------------------//
Function Converti_Immagine_Bmp(cFile,cFolderTemp,cNewName,nResize)
   Local ext:="
.Bmp"
  // Local nResize:=0.30
   Local hBmp := FW_ReadImage( nil, cFile )[ 1 ]
   Local hNew := FW_TransformBitmap( hBmp, NIL, nResize )

   FW_SaveImage( hNew, cFolderTemp+cNewName+ext )

 Return   cFolderTemp+cNewName+ext
//------------------------------------------------------------------//




When the function Fw_saveimage converte a png to Bmp not converte the black space ( the alpha transparent on Png)
and when I use these bmps files converted

I have this . it run ok but It is ugly to see and it is not clear

Image

How could I improve the image, perhaps removing the black background?

Re: Problem to convert Image file (fw_saveImage() )

Posted: Wed Feb 20, 2019 3:25 pm
by nageswaragunupudi
You better use some imaging software for the conversion.