1. BK_COLOR()
Hi everybody,
I4m just starting with Euphoria and got4 a problem... When I set the
background
colour using the
defeault built-in function, it seems the whole palette is changed, thus color #0
is set to the RGB of the
color I choosed for background. This is quite a problem if you are trying to
load some bitmaps because the
"black" pixels become background-color pixels.
Thus any have an idea to easily overcome this stuff????
Thanks.
2. Re: BK_COLOR()
At 12:27 AM 10/9/96 -0400, you wrote:
>---------------------- Information from the mail header -----------------------
>Sender: Euphoria Programming for MS-DOS <EUPHORIA at
>MIAMIU.ACS.MUOHIO.EDU>
>Poster: Daniel Berstein Zimmermann <dberst at CMETNET.CMET.NET>
>Subject: BK_COLOR()
>-------------------------------------------------------------------------------
>
>Hi everybody,
>
> I4m just starting with Euphoria and got4 a problem... When I set
the background
> colour using the
>defeault built-in function, it seems the whole palette is changed, thus
color #0
> is set to the RGB of the
>color I choosed for background. This is quite a problem if you are trying to
> load some bitmaps because the
>"black" pixels become background-color pixels.
> Thus any have an idea to easily overcome this stuff????
>
> Thanks.
>
>
I found two ways of getting around this problem Daniel. The first thing
was to convert all the BMPs I made to actual Euphoria statements.
As a result, the black colour didn't go "transparent" on me. I used
display_image() and pixel() statements instead that were made
from BMP conversion.
The second approach when converting the BMP's became too much of a hassle was
to select a wider range of colours to create a BMP in. Instead of selecting
black, I selected a colour that was very close to black's RGB setting, but
was not black. It did the job perfectly.
Personally, I'd recommend the first approach even though it is a bit more
work.
Hope this helps!
David Gay
3. Re: BK_COLOR()
Here's a third idea, Daniel:
Use the palette() command to remap black to {1,1,1}....I just tried
it and it works!
Thanks!
David
4. Re: BK_COLOR()
David Gay wrote:
>
> I found two ways of getting around this problem Daniel. The first thing
> was to convert all the BMPs I made to actual Euphoria statements.
> As a result, the black colour didn't go "transparent" on me. I used
> display_image() and pixel() statements instead that were made
> from BMP conversion.
>
> The second approach when converting the BMP's became too much of a hassle was
> to select a wider range of colours to create a BMP in. Instead of selecting
> black, I selected a colour that was very close to black's RGB setting, but
> was not black. It did the job perfectly.
>
> Personally, I'd recommend the first approach even though it is a bit more
> work.
>
> Hope this helps!
>
> David Gay
Thanks! I4ll work around that.