Jump to content

  • Log In with Google      Sign In   
  • Create Account

Transparent Blitting in 16-bit


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Gav   Members   -  Reputation: 124

Like
Likes
Like

Posted 27 January 2000 - 11:57 AM

I''m having a bit of trouble doing a transparent blt in 16-bit colour. I save a bitmap with 16 million colours (ie 24-bit) in PSP 6 with a background colour of RGB(66,66,66). Then I use a slight variation on DDLoadBitmap from ddutils.cpp to load it into a surface with the screen mode set to 16-bit. I then use a slight variation of DDSetColorKey with a value of RGB(66,66,66) but the back ground is still blitted. However if i use CLR_INVALID or RGB(69,69,69) for the parameter to DDSetColourKey it works fine. Does anyone know why it is RGB(69,69,69) that works and not RGB(66,66,66)? I realise that the colour may change from conversion from 24 to 16-bit, but isn''t that what DDColourMatch is for? When I say a slight variation, all i''ve done is copy the code into my own class and modified some of it, eg the surface variable. No sense being pessimistic. It wouldn''t work anyway.

Sponsor:

#2 Atavist   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 12:57 PM

The first obvious problem is RGB()

Are you useing windows macro named RGB()
because that one has nothing to do with 16-bit colour, your going to have to write your own RGB16() and when you do you have to take into account that some video cards use 5-5-5-bit colour while others use 5-6-5-bit colour (more common)

Hope that points you in the right direction.

p.s. Its nice to see someone spell colour properly

Edited by - Atavist on 1/27/00 6:59:19 PM




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS