Problem to convert Image file (fw_saveImage() )

Problem to convert Image file (fw_saveImage() )

Postby Silvio.Falconi » Wed Feb 20, 2019 9:22 am

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 view  RUN
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?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7076
Joined: Thu Oct 18, 2012 7:17 pm

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

Postby nageswaragunupudi » Wed Feb 20, 2019 3:25 pm

You better use some imaging software for the conversion.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 51 guests