Re: Merging Of Images

new topic     » goto parent     » topic index » view thread      » older message » newer message

> I couldn't build an inverse color lookup table, because different color
> backgrounds caused different colors to appear. It finally occured to me
that
> if I wrote a character to the background using the *background* color,
I'd
> get a black character on the screen. I could then display the character
> again, this time using the correct foreground color.
>
> You may be able to create a mask for your image, instead of resorting to
> false colors.

This is a great idea, David. I believe it is possible to create a mask for
this image, even though it is quite a large image. The only thing I have to
work around is the mask colour. Silly me used black in parts of the
background so I'm going to have to use a mask colour other than black. But
I believe your idea will solve my problem, with a noticable improvement in
speed.

Rather than force you to endure yet another series of meaningless
characters as Email (and spare myself the embarassment of screwing up an
attachment for the third time), the image can be seen at
http://www.interlog.com/~moggie/indexscr.gif , in case you want to look at
it again.

I'm glad you improved the putsxy() library routine I wrote a while back.
It's appropriate,  seeing you are the one that allowed us to use special
fonts in our programs. :)...my version wasn't as clever as I thought it was
at the time, particularly because of the number of lines it took to store
each display_image() character. I have since improved on that, allowing the
display of all printable ASCII characters and using much fewer source lines
to do it. The trick is to take each 8 pixel line and convert it to bits,
which is then stored as a single byte thanks to bits_to_int(). This means
only 16 bytes are required to represent a 8 pixel wide, 16 pixel high
image, instead of saying:

{{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0}}

as a series of source lines in the program.

If you can come up with even better versions of putsxy(), I certainly want
to know about it. Your future contributions regarding text handling in
graphics mode would be valuable.

Thanks

David Gay
http://www.interlog.com/~moggie/Euphoria
"A Beginner's Guide To Euphoria"

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu