1. Palette problem

WOW !!!

Neil is a KILLER !!!

Message to "Tick": Please don't give Neil no aspirin tablet!
I like him just the way he is!


I have one question, though: I'm saving a big 256 color image
from "paint shop pro" using "windows RGB encoded BMP" format.

When I display it in Neil, the colors are not quite correct.
The entire palette seems to be just slightly different from
what they look like in PSP. Some of the green colors are
for example  twisted to an ugly yellowish hue.

My code looks like this (simplified):

include neil.e
sequence map
if gfx_mode(640, 480, 8) then end if
map = load_bitmap("bigmap.bmp")
map = map[1]&{0,0}&map[2..3]
use_bitmap_palette()


Everything but the colors seems right.


Thanks,

Tor

new topic     » topic index » view message » categorize

2. Re: Palette problem

Tor writes:
> When I display it in Neil, the colors are not quite correct.
> The entire palette seems to be just slightly different from
> what they look like in PSP. Some of the green colors are
> for example  twisted to an ugly yellowish hue.

right, because the load_bitmap function is remapping your palette colors
to the standard palette.  You have use_bitmap_colors() in your program,
but it must be called *before* load_bitmap, so that load_bitmap knows to
set the image palette and use that palette from then on.

> My code looks like this (simplified):

corrected:

include neil.e
sequence map
if gfx_mode(640, 480, 8) then end if
use_bitmap_palette()
map = load_bitmap("bigmap.bmp")
map = map[1]&{0,0}&map[2..3]

Later,
 _______  ______  _______  ______
[    _  \[    _ ][ _   _ ][    _ ]
[/| [_] |[/| [_\][/ | | \][/| [_\]
  |  ___/  |  _]    | |     |  _]
[\| [/]  [\| [_/] [\| |/] [\| [_/]
[_____]  [______] [_____] [______]
xseal at harborside.com  ICQ:13466657
http://www.harborside.com/home/x/xseal/euphoria/

new topic     » goto parent     » topic index » view message » categorize

3. Re: Palette problem

Pete wrote:
> ... use_bitmap_colors() ... must be called *before* load_bitmap

Aha! Now it works like a dream.

Neil is incredibly fast! And I'm talking about 640x480x256 mode!
And I haven't even started using long command lists yet ! smile

Here are three asm routines I miss in Neil:

1) Flip: (define virtual screen and x1,y1,x2,y2): Flip bitmap.
2) Mirror:  vertical flip
3) rotate_90: (or 180 or 270).

These could come in handy any time.


Thanks,

Tor

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu