Jump to content
Sign in to follow this  
rcbarend

No TRUE black in 256 colors bitmap?

Recommended Posts

Guest jaapverduijn

Greetings!I'm pretty close to being a total nitwit when it comes to panel (re)-designing, and I encountered an odd problem. I revamped a panel and saved it in 256 colors bitmap (using Paint).When I started the sim up, the panel looked fine, but there were no outside views, in other words: the windows weren't truly black (#000000). I went back to paint in order to solve the issue, and discovered that black didn't exist anymore! Trying to fill in the windows with black gave me not #000000 but #040204. Slight desparation set in (grin)!Eventually I saved the panel as 24 bit bitmap, and lo and behold: black was black again! I could see outside, and use the panel! But... the panel now is nearly 2.5M, while in 256 colors it's only 7.something K. The 256 colors are more than sufficient for this panel, but whatever I do, I cannot make "black" anything else but #040204. I tried pasting in a TRUE black patch from another file, but even this immediately changes to that darn #040204.Can anybody tell me what I'm doing wrong, and how, and why...?Be well!Jaap Verduijn.

Share this post


Link to post
Share on other sites
Guest iholrf

I have encountered the same problem with Paint Shop Pro. It has a function to count the colors used and often its far less than the pallet size and seems to save only those colors within the bitmap and when reloaded the pallet only reflects those colors..Image programs, as I understand them, will use a number of algorithms to dither (match closely) the colors it is removing with one in the pallet of the bit depth you chose. It will "guess" based on the the parameters in the algorithm, but often this guess is not precise. It figures the avarage human can not tell the difference between a few shades of color thus we would never notice that one black is not as black as another. The value becomes even less accurate if the color its algorithm choses as a replacement is not contained within the images saved pallet.This is actually a reasonable way to do things and 99.99% of the time it works. The problem is, we as panel designers need a pure black, and often the paint program doesn't care if its 0,0,0 or 0,0,5... black is black (I have often run into the reverse problem... moving part of an image sometimes results in a near black becoming black and thus transparent... not the desired result.The only thing I can say is this: When I want to end up with a 256 color image, I start with a 256 color image. Reducing the color of other bit depths will result in quality loss, often dramatic. The lowest depth I would take a 24bit down to is 16bit grey scale.Caveat EmptorThis is only my experience in Paint Shop Pro 5.1... This problem may or may not exist in other programs.CheersShad

Share this post


Link to post
Share on other sites

Have you tried pasting the panel image into a new MSPaint file? Sounds like the pallet for the existing file has been messed up.You could also try defining a "custom" color as pure black.Doug

Share this post


Link to post
Share on other sites
Guest jaapverduijn

Thanks guys! Well... I tried it all (and several other things), but I'm stuck with either non-transparant windows, or a panel bitmap of an enormous size. So I think I will stick with the latter...Be well!Jaap Verduijn.

Share this post


Link to post
Share on other sites

Hi Jaap,As Doug already implied:Doesn't your Paint program support the options of "Editing" the used palette ??I.o.w.: redefine one of the dark colors as color 0,0,0 ???I use PaintShopPro 7, and it has never been a problem to solve it this way.Rob

Share this post


Link to post
Share on other sites

What I do with PSP 7.2, if the colour I want is not under the 256 used in a certain bitmap, is1.increasing colour depth to 24 million2. editing3. decrease colour depth back to 256This way any clour you use whan in 24 million mode will then also be displayed in 256 mode - off course only, if there not allready more than 256 colours used.For me the quickest and no loss in qulaity.Wolfgang

Share this post


Link to post
Share on other sites
Guest jaapverduijn

Ha die Rob!Dat is deel van het probleem (that's part of the problem). I can indeed edit the palette, and make the black true RGB 0,0,0..., but once I fill in the plane's windows with the true color, it changes itself back to #040204. Even true (0,0,0) black that I cut and paste from other panels immediately changes itself into the wrong color once it's in the misbehaving bitmap.It's got me beat (sad grin)!Be well!Jaap Verduijn.

Share this post


Link to post
Share on other sites
Guest jaapverduijn

Greetings Wolfgang!That's sort of how the whole problem started. It was an 8 bit bitmap to begin with, with which I pottered about a bit and someway, somehow, I must have messed up some settings. When I was satisfied with my work (for the time being - it'an ongoing project) I saved it as 8 bit bitmap (256 colors), it looked perfect, but... the true black was gone, unchangeably. After lots of despair and trial and error I got the idea to save it as 24 bit instead, and there I could change the faulty black back to true black. The 24 bit panel works perfectly, but it's 2.25 Megs in size. So after the black was correct, I saved it back to 8 bit which gives me some 750 K or something like that. The panel looks EXACTLY the same, no color loss or loss of detail, except... that bloody black! So I went back to the 24 bit version, and all was well. Funny thing is, when I take Paint and try to save the 24 bit panel into 8 bit, it looses an enormous lot of color (seems like it reverts not to 256 colors but to 16 colors). The black is perfect then, but the panel is a mess. The 8 bit version that looks exactly like the 24 bit version with the exception of the true versus non-true black, was saved with IrfanView. I messed up something very badly, but as long as I work with the 24 bit version (which I have come to believe is an 8 bit version which only CALLS itself 24 bits, and swells its size accordingly) there is no problem at all!So I've got another question. Would, for framerates and such, make the difference much difference (badly put, but y'all understand what I mean - grin)?!Thanks for all your time, guys, much appreciated!Jaap Verduijn.

Share this post


Link to post
Share on other sites
Guest jaapverduijn

Greetings Ed!That's one thing I didn't try yet. I'll give it a go today and let you know!Be well!Jaap Verduijn.

Share this post


Link to post
Share on other sites

As I said take your 24 bit bmp convert it to 8 bit (using the method that least distorts your bmp) then if you find your black (the bit you want RGB 0,0,0) is not quite, use the contrast function and increase the contrast of your 8 bit bmp until it is.regardsEdhttp://forums.avsim.net/user_files/106762.jpg"You don't stop playing 'cause you get old. You get old 'cause you stop playing."

Share this post


Link to post
Share on other sites

You can try this, Convert it to 256 color in PSP then open the bitmap in MS paint and then do the windows in MS Paint's true black (0,0,0,)then save it in 256 and the colors should stay. I use a combination of PSP and Paint on almost every project.Brian

Share this post


Link to post
Share on other sites
Guest jaapverduijn

Greetings Ed!You made my day! Your suggestion was my last hope: I tried it and... it worked! Thanks a lot, mate!Be well!Jaap Verduijn.

Share this post


Link to post
Share on other sites

>As I said take your 24 bit bmp convert it to 8 bit (using the>method that least distorts your bmp) then if you find your>black (the bit you want RGB 0,0,0) is not quite, use the>contrast function and increase the contrast of your 8 bit bmp>until it is.In Photoshop, I reduce the brightness by -1 and that does the trick for me... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Well ya learn somthing new everyday doncha!Rob was spot on as usual! Reduce colours to 8bit using the method that offers least distortion ...if the RGB 0,0,0 does not stay that way ...then use edit palette and change your darkest black to RGB 0,0,0 ...and save.thankyou Rob! :)I was using Paint Shop Pro BTWregardsEdhttp://forums.avsim.net/user_files/106762.jpg"You don't stop playing 'cause you get old. You get old 'cause you stop playing."

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...