Sign in to follow this  
Guest bartels

Gauge bitmap question

Recommended Posts

I'm creating a gauge using the C API and am having difficulty getting any of my 24-bit bitmaps to show up properly. I've done my research: MS SDK, Dragonflight tutorial, and many searches in this forum including the archived threads. What I have learned so far is something I want to verify: that no matter what color depth a bitmap is saved as, it will never show up in FS2002 with more than 256 colors. I hope this isn't the case, but so far, it's looking like it is.Also, I tried setting two bitmaps for the same element in my gauge: one at, say, ID 1000, and another at 1500 (decimal). According to the Dragonflight tutorial, this is what you're supposed to do to separate the 8-bit bitmap from the 24-bit bitmap. However, the 24-bit version is never shown in my panel, even when I have my settings fully maxed out and screen set to 1280x1024x32. Is there something else I need to do other than just include the bitmap and the ID + 500 ?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I can't say much to the used colour depth, but the ID+500 is not for different color depths, but for the resolution of the bitmap, ID for "low resolution" and ID+500 for high resolution. I have never really tried to use high and low resolution bitmaps together, I prefer to use one with a high resolution. The only situation I realized that there is a +500 offset was, if I forgot that and used ID+500 not for a high resolution buitmap but for a completely other one. The result were strange displays at higher sreensizes, where all bitmaps were messed up.Arne Bartels

Share this post


Link to post
Share on other sites

Hi Guy,the 24 bit bitmaps should display ok. But usually for gauges, since there are little differences in color for any single element to display, downsampling them to 256 colors is always enough (photoshop does it very well).As for the ID, here is a table I use to always avoid conflicts:// NB: number rules//// group by 512 items max://// 0x1100-0x12F3 0x1500-0x16F3 0x1900-0x1AF3// 0x2100-0x22F3 0x2500-0x26F3 0x2900-0x2AF3// 0x3100-0x32F3 0x3500-0x36F3 0x3900-0x3AF3// 0x4100-0x42F3 0x4500-0x46F3 0x4900-0x4AF3//// to avoid number+500 considered as same bitmap with different resolution in FS2002Hope this helps!

Share this post


Link to post
Share on other sites

Thanks for the help... I'm not going to bother with higher resolution versions of my bitmaps, as they're pretty high-res as it is. As far as the downsampling in Photoshop goes, I agree, it does a great job at that. The problem I'm seeing in FS2K2 is some banding, even on a 256 color indexed bitmap. Here is an example... the first picture is how it looks in Photoshop, the second is how it looks in FS2K2.Is there any way I can increase the quality of the bitmap in FS2K2? I'm already running at 1280x1024x32.

Share this post


Link to post
Share on other sites

Hi Guy,the banding effect you get is inherent to the bitmap format FS2002 is processing the bitmaps internaly. There is nothing more you can do unfortunately since internaly, FS2002 downsamples each RGB components to less than the usual 256 discreet values scale, hence the banding effect. You could however try to convert to 256 colors WITH error diffusion with photoshop to lessen the effect, at the expense of jaggies and artifacts when the bitmap (in this example the SR22 ADI) is rotated and / or scaled on the panel.Hope this helps!

Share this post


Link to post
Share on other sites

Did you try the IMAGE_BILINEAR_.. constants as additional image_flags? They are often useful to avoid jaggines of lines, I don't know if they help with the "banding" effect.Arne Bartels

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