FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bitmap + binary
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bitmap + binary

Posted: Tue Sep 10, 2013 09:13 PM
Antonio,

Antonio Linares wrote:Enrico,

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


Sent to your private email.

EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bitmap + binary

Posted: 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
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bitmap + binary

Posted: 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Bitmap + binary

Posted: Wed Sep 11, 2013 03: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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bitmap + binary

Posted: Wed Sep 11, 2013 06: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

Continue the discussion