mastintin wrote:Enrico Maria Giordano wrote:On XP and Vista your sample shows a black rectangle.
EMG
https://support.microsoft.com/es-es/kb/958911
Ok, thank you.
EMG
mastintin wrote:Enrico Maria Giordano wrote:On XP and Vista your sample shows a black rectangle.
EMG
https://support.microsoft.com/es-es/kb/958911
Enrico Maria Giordano wrote:mastintin wrote:Enrico Maria Giordano wrote:On XP and Vista your sample shows a black rectangle.
EMG
https://support.microsoft.com/es-es/kb/958911
Ok, thank you.
EMG
Bitmap* newImage = new Bitmap( nWidth, nHeight, PixelFormat32bppPARGB ) ; // cambio aqui ---- original->GetPixelFormat() );
nageswaragunupudi wrote:Mr Manuel
- Code: Select all Expand view
Bitmap* newImage = new Bitmap( nWidth, nHeight, PixelFormat32bppPARGB ) ; // cambio aqui ---- original->GetPixelFormat() );
This is the change you made. That means this function adopts "PixelFormat32bppPARGB" for "all" image/bitmap files, irrespective of the source and present pixelformat.
Does it have any side effects on other file formats?
nageswaragunupudi wrote:One of the cases I can now recollect is non-alpha bmp files.
The hBitmap returned is an alpha bmp. We get into problem while rendering.
.....
int nWidth = original->GetWidth() ;
int nHeight = original->GetHeight() ;
PixelFormat pf ;
if( strncmp( adr, "GIF", 3 ) != 0 ) // detect if file is a gif type.
pf = original->GetPixelFormat();
else
pf = PixelFormat32bppPARGB ;
Bitmap* newImage = new Bitmap( nWidth, nHeight, pf ) ;
Graphics * graphics = new Graphics( newImage );
.....
nageswaragunupudi wrote:Mr Manuel
So your proposal is to force 32bppPARGB for GIFs.
Done it.
.......
PixelFormat pf ;
pf = original->GetPixelFormat();
bool l32bpp = hb_parl( 2)
if ( ( strncmp( adr, "GIF", 3 ) == 0 ) & ( l32bpp == TRUE ) )
pf = PixelFormat32bppPARGB ;
Bitmap* newImage = new Bitmap( nWidth, nHeight, pf ) ;
........
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 53 guests