PB 2.95 for Windows - Reduzed ImagePalette
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
Hi @ all
I found a little observe while coding on my game project... I open a 16 bit screen, and show only a white Font printed to the screen in the intro sequence with a 256 coloured background picture...
Also the backgroundpicture is 256 with a smooth fading colour palette... When i open the game screen in 16 bit and display the 256 colour bmp picture, the background pic will be showed looks like reducded to 8 or 16 colours *horrorable* - How could this be happen, because the picture has only 256 colours! When open a screen with 32 bit the background picture looks ok... I dont understand this problem at the moment... I think this cant be a problem in fact of using only 16 bit screen... Any idea?
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
Edited by - MrVainSCL on 28 February 2002 03:27:14
Hi @ all
I found a little observe while coding on my game project... I open a 16 bit screen, and show only a white Font printed to the screen in the intro sequence with a 256 coloured background picture...
Also the backgroundpicture is 256 with a smooth fading colour palette... When i open the game screen in 16 bit and display the 256 colour bmp picture, the background pic will be showed looks like reducded to 8 or 16 colours *horrorable* - How could this be happen, because the picture has only 256 colours! When open a screen with 32 bit the background picture looks ok... I dont understand this problem at the moment... I think this cant be a problem in fact of using only 16 bit screen... Any idea?
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
Edited by - MrVainSCL on 28 February 2002 03:27:14
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Pupil.
It's probably because of your 16 bit screen. Your 256 colour palette has colour values that are close together but on a 16 bit screen these colours get quantisized i.e. you go from a RGB(8bit,8bit,8bit) palette to a colour representation RGB(5bit,6bit,5bit), this means that colours that lies close becomes the same in 16 bit format.Hi @ all
I found a little observe while coding on my game project... I open a 16 bit screen, and show only a white Font printed to the screen in the intro sequence with a 256 coloured background picture...
Also the backgroundpicture is 256 with a smooth fading colour palette... When i open the game screen in 16 bit and display the 256 colour bmp picture, the background pic will be showed looks like reducded to 8 or 16 colours *horrorable* - How could this be happen, because the picture has only 256 colours! When open a screen with 32 bit the background picture looks ok... I dont understand this problem at the moment... I think this cant be a problem in fact of using only 16 bit screen... Any idea?
greetz
MrVainSCL! aka Thorsten
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by freedimension.
Pupil could be right
The colors in a 256 colorpalette are taken out from the full RGB 24bit color Range. Not so in 16bit graphics. Here you have more different colors but the range is a lot smaller.
Try to dither your image.
I.e: Blend the different colors together like this
*******+**+*++*+++++
******+**+***+**++++
*******+*+**++*+++++
Pupil could be right
The colors in a 256 colorpalette are taken out from the full RGB 24bit color Range. Not so in 16bit graphics. Here you have more different colors but the range is a lot smaller.
Try to dither your image.
I.e: Blend the different colors together like this
*******+**+*++*+++++
******+**+***+**++++
*******+*+**++*+++++
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by El_Choni.
AFAIK, 16 bit images use 5 bits for R, G, B, and bit 16 is not used. That is, you have 32 levels for each color intensity instead of 256. If your image has, for example, a degradation of blue, it'll probably look horrible in 16 bit.
But maybe you can choose the palette for the image, I don't know.
Bye,
El_Choni
AFAIK, 16 bit images use 5 bits for R, G, B, and bit 16 is not used. That is, you have 32 levels for each color intensity instead of 256. If your image has, for example, a degradation of blue, it'll probably look horrible in 16 bit.
But maybe you can choose the palette for the image, I don't know.
Bye,
El_Choni
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
Sure, the color range in 16 bit is smaller as in 24 or in 32 bit! When i would try to display a 16/24/32 bit image on a 256 screen, it would be displayed in less colours and looks like very much reduced... normal!
But when i have an image with ONLY 256 colours, it should be display correctly on a 16 bit screen... Maybe some colours may be a little bit different... but this different should be sooo small that you not really notice it... Hey, we have a 16 bit screen and want just only display an image with 256 colours.... There should be enough colours in 16 bit to display the original 256 colours image as best as possible like the original and not like in my project to be reduced like ONLY 8-16 colours (thats strange!)
I cant really belive this, because on Amiga there was not such a problem with 8/16/24 bit screen palettes...
I know a lot of intros, where you can select between 16,24 and 32 bit mode... Ok, some textures there may be looks a litte bit different when using one of those modes... But i have NEVER seen an intro, where the colours are so hard reduced (like 16 colours) when using 16 bit... Sorry, i really cant understand this... And i dont want to run my game in 32 bit mode... First, not everybody may have a 32bit gfx card and 32 bit are slower then 16 bit...
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
Hi...freedimension wrote:
Pupil could be right
The colors in a 256 colorpalette are taken out from the full RGB 24bit color Range. Not so in 16bit graphics. Here you have more different colors but the range is a lot smaller.
Sure, the color range in 16 bit is smaller as in 24 or in 32 bit! When i would try to display a 16/24/32 bit image on a 256 screen, it would be displayed in less colours and looks like very much reduced... normal!
But when i have an image with ONLY 256 colours, it should be display correctly on a 16 bit screen... Maybe some colours may be a little bit different... but this different should be sooo small that you not really notice it... Hey, we have a 16 bit screen and want just only display an image with 256 colours.... There should be enough colours in 16 bit to display the original 256 colours image as best as possible like the original and not like in my project to be reduced like ONLY 8-16 colours (thats strange!)
I cant really belive this, because on Amiga there was not such a problem with 8/16/24 bit screen palettes...
I know a lot of intros, where you can select between 16,24 and 32 bit mode... Ok, some textures there may be looks a litte bit different when using one of those modes... But i have NEVER seen an intro, where the colours are so hard reduced (like 16 colours) when using 16 bit... Sorry, i really cant understand this... And i dont want to run my game in 32 bit mode... First, not everybody may have a 32bit gfx card and 32 bit are slower then 16 bit...
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Franco.
http://www.irfanview.com
Forgot to mention: it's freeware
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Edited by - franco on 28 February 2002 18:19:30
IrfanView is the best software I know for such a converting thing...If I were you, I would open the bmp with Paint or whatever, save it as 16 bpp, open again and save as 256, maybe 16 bpp is picky about what colors it uses?
El_Choni
http://www.irfanview.com
Forgot to mention: it's freeware
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Edited by - franco on 28 February 2002 18:19:30
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
Mhhhh.... is it really normal that a 256 colours image will so hard reduced when displaying it on a 16 bit screen (where normaly many more colours must be) ????
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
Mhhhh.... is it really normal that a 256 colours image will so hard reduced when displaying it on a 16 bit screen (where normaly many more colours must be) ????
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by DarkUni.
My experience has always been;
Generate your graphics in the mode you plan to display them in.
Its certainly not unique to PB - as I recall, Blitz has the same issue with 256 color bitmaps in a 16bit environment.
If you go through the BlitzProfessional.com forum (and the official site forum too) and search for "16-bit" you should find a lot of verbose descriptions as to why 16-bit is kinda a 'hack'. The questions on the forums are slanted to 'reading color registers on a 16-bit screen' not being accurate.
Here is one such message:
http://www.blitzprofessional.com/forums ... 24&forum=3
I just don't fight the power and make all my graphics for games in 16-bit PNG.
Hope this is helpful.
Shane R. Monroe, Dark Unicorn Productions
Pure Basic Basement
http://pb.darkunicornproductions.com
My experience has always been;
Generate your graphics in the mode you plan to display them in.
Its certainly not unique to PB - as I recall, Blitz has the same issue with 256 color bitmaps in a 16bit environment.
If you go through the BlitzProfessional.com forum (and the official site forum too) and search for "16-bit" you should find a lot of verbose descriptions as to why 16-bit is kinda a 'hack'. The questions on the forums are slanted to 'reading color registers on a 16-bit screen' not being accurate.
Here is one such message:
http://www.blitzprofessional.com/forums ... 24&forum=3
I just don't fight the power and make all my graphics for games in 16-bit PNG.
Hope this is helpful.
Shane R. Monroe, Dark Unicorn Productions
Pure Basic Basement
http://pb.darkunicornproductions.com
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
Hi El_Choni and DarkUni
Thanks for your help and to explain me... I´m only a bit wondered... because 8bit images are normaly 256 colours (so i know it from old amiga times
Seems i have to learn some news and esp. windows related stuff (256 images on 16 bit screen)
Mhhhh... i will check the posted link soon... thanks... i will try and play a bit arround... this fact is really new for me
bye
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
Hi El_Choni and DarkUni
Thanks for your help and to explain me... I´m only a bit wondered... because 8bit images are normaly 256 colours (so i know it from old amiga times

Mhhhh... i will check the posted link soon... thanks... i will try and play a bit arround... this fact is really new for me

PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by DarkUni.
I COMPLETELY understand. Let's ALL be honest. The PC was never originally designed to display graphics or make music ...
I'm from a long tenure of Amiga use and I know - things on the PC make VERY little sense sometimes.
Just be thankful that we have PureBasic, Blitz, etc. I couldn't imagine programming the PC 'old school' with the weird memory requirements, bank switching, blah blah blah ...
Shane R. Monroe, Dark Unicorn Productions
Pure Basic Basement
http://pb.darkunicornproductions.com
I COMPLETELY understand. Let's ALL be honest. The PC was never originally designed to display graphics or make music ...
I'm from a long tenure of Amiga use and I know - things on the PC make VERY little sense sometimes.
Just be thankful that we have PureBasic, Blitz, etc. I couldn't imagine programming the PC 'old school' with the weird memory requirements, bank switching, blah blah blah ...
Shane R. Monroe, Dark Unicorn Productions
Pure Basic Basement
http://pb.darkunicornproductions.com
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Danilo.
>I couldn't imagine programming the PC 'old school'
>with the weird memory requirements, bank switching,
>blah blah blah
Thats RealMode, like DOS.
Windows, Linux and other OS´s are Protected Mode,
so "memory requirements, bank switching, blah blah blah"
isnt a problem anymore.
cya,
...Danilo
(registered PureBasic user)
>I couldn't imagine programming the PC 'old school'
>with the weird memory requirements, bank switching,
>blah blah blah
Thats RealMode, like DOS.
Windows, Linux and other OS´s are Protected Mode,
so "memory requirements, bank switching, blah blah blah"
isnt a problem anymore.
cya,
...Danilo
(registered PureBasic user)