Board index » delphi » TRANSPARENT IMAGES problem, plz help!

TRANSPARENT IMAGES problem, plz help!

Ok. Here's the thing:

I want to put an image (pointer) to screen and mask the black pixel !

I have thousands of Source Codes to do that, but they're ALL for
320x200 256 colors mode and they're written in ASM, so i have NO IDEA how to
change them because i don't know ANY ASM, besides they don't even work.
I'm using the Graph unit, and the BGI files, so I need a procedure or
something (doesn't matter if it's in ASM or not, as long as it works) to put
an image (pointer) on the screen masking the black pixels. I'm using 640x480
256 colors mode...
IF ANYONE CAN HELP ME, i would really apreciate it....
UIN: 4321604
10x !

 

Re:TRANSPARENT IMAGES problem, plz help!


Quote
On Sun, 15 Feb 1998 23:56:45 -0000, <@mnsi.net> wrote:
>I want to put an image (pointer) to screen and mask the black pixel !

It is true that Graph unit doesn't support this type of masking. There are two
ways to go around this; 1. use bitmaps, 2. use another unit for graphics.

1. With GetImage and PutImage you can extract an render bitmaps with the graph
unit. Simply extract the rectangular portion of the screen you want to put the
pointer on, write your own bitmap routines to do the masking of the black color,
and render the bitmap back into the video memory. Of course you should keep a
copy of the original background so you can erase the pointer again.

2. There are quite a few alternatives to the graph unit available on the
internet. Some are good, some not, some are compatible with the Graph unit other
are not. Let me do some self-promotion here, everybody seems to do it, you get
get my VESA256 unit at:

http://home.worldonline.nl/~wpdejong/vesa.html

I would describe this unit as 'good' but 'not completely compatible'. It does
allow you to mask out color number 0 however (SpriteBlit). There are more
compatible units out there but most are shareware, and you don't get the source
code.

Peter de Jong
wpdej...@worldonline.nl

2.

Re:TRANSPARENT IMAGES problem, plz help!


Quote
@mnsi.net <@mnsi.net> wrote in message ...

>Peter de Jong wrote in message <34e7fea2.1002...@news.worldonline.nl>...
>>On Sun, 15 Feb 1998 23:56:45 -0000, <@mnsi.net> wrote:

>ok, that might be an idea, but SetActivePage and SetVisualPage DON'T WORK
in
>the GRAPH  UNIT, not on 640x480 256 colors mode... i'm not sure why...
>if you have a solution, please let me know...
>10q

Other Threads