Bitmap + binary

Re: Bitmap + binary

Postby Enrico Maria Giordano » Tue Sep 10, 2013 9:13 pm

Antonio,

Antonio Linares wrote:Enrico,

Could you provide an example to check what you comment ? thanks


Sent to your private email.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bitmap + binary

Postby Antonio Linares » Tue Sep 10, 2013 10:11 pm

Enrico,

It seems as your bitmap uses a palette that PalBmpDraw() activates (though strangely hPalette is supplied as zero to PalBmpDraw()) and DrawBitmap() does not activate it.

In other words, for some bitmaps DrawBitmap() will be fine and for others that use a palette, PalBmpDraw() is required :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bitmap + binary

Postby Enrico Maria Giordano » Tue Sep 10, 2013 11:11 pm

Antonio,

Antonio Linares wrote:Enrico,

It seems as your bitmap uses a palette that PalBmpDraw() activates (though strangely hPalette is supplied as zero to PalBmpDraw()) and DrawBitmap() does not activate it.

In other words, for some bitmaps DrawBitmap() will be fine and for others that use a palette, PalBmpDraw() is required :-)


Ok, thank you.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bitmap + binary

Postby nageswaragunupudi » Wed Sep 11, 2013 3:20 am

Antonio Linares wrote:Enrico,

It seems as your bitmap uses a palette that PalBmpDraw() activates (though strangely hPalette is supplied as zero to PalBmpDraw()) and DrawBitmap() does not activate it.

In other words, for some bitmaps DrawBitmap() will be fine and for others that use a palette, PalBmpDraw() is required :-)

Mr Antonio

How to decide what function to use for a particular bitmap?
Regards

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

Re: Bitmap + binary

Postby Antonio Linares » Wed Sep 11, 2013 6:23 am

Rao,

I would say that for any bitmap, PalBmpDraw() is the way to go.

The difference is in the palette management though in Enrico`s example, a zero is supplied as the palette, but somehow PalBmpDraw() makes it work.

It seems as the PalBmpDraw() source code somehow makes the palette works fine (though it is not used as it is zero!).

Maybe if we apply the source code of PalBmpDraw() into DrawBitmap() then we can fix DrawBitmap() for palettes.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests