256 color in VB vs IE

256 color in VB vs IE

Post by Tim Schulke » Tue, 22 Apr 2003 21:03:57



We have an application that displays graphics from our
marketing dept which are True Color pictures. In 256 color
mode these images are rendered much worse in VB using
either the image or picture control vs IE. Can someone
explain why this is the case and what can be done about it
in VB.

Thank you.

Tim Schulken

 
 
 

256 color in VB vs IE

Post by Mike D Sutto » Tue, 22 Apr 2003 21:34:17


Quote:> We have an application that displays graphics from our
> marketing dept which are True Color pictures. In 256 color
> mode these images are rendered much worse in VB using
> either the image or picture control vs IE. Can someone
> explain why this is the case and what can be done about it
> in VB.

VB will simply perform a nearest colour mapping without any dithering, have
a look at using a halftone palette instead.  If you want even better results
then you may want to look into performing colourspace quantisation methods
to generate an optimal palette for the image, the Octree method is well know
and documented, Google should provide plenty of links for you there.  This
book also has some good information in on both methods: www.FengYuan.com
Hope this helps,

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://www20.brinkster.com/EDais/



 
 
 

256 color in VB vs IE

Post by Tim Schulke » Wed, 23 Apr 2003 12:52:24


Mike,

The Octree method worked but was extremely slow (2-10secs depending on
image), this may sound like a stupid question but could I achieve the same
results by setting the PaletteMode on the form to custom and use a WebSafe
color palette and could that work w/ better performaning results?

If so how would one go about creating an image to represent those web safe
colors.

Thanks.

Tim Schulken

 
 
 

256 color in VB vs IE

Post by Mike D Sutto » Wed, 23 Apr 2003 20:35:39


Quote:> The Octree method worked but was extremely slow (2-10secs depending on
> image), this may sound like a stupid question but could I achieve the same
> results by setting the PaletteMode on the form to custom and use a WebSafe
> color palette and could that work w/ better performaning results?

> If so how would one go about creating an image to represent those web safe
> colors.

If you have a fixed palette such as the web palette then you needn't go
through the colourspace quantisation method, it's a while since I've worked
with an 8-bit graphics display but if your image already has a palette then
you can use that by setting the Form's .Palette property to the image and
setting the .PaletteMode property to 2 - Custom.
You may want to try looking up old posts on the subject at groups.google.com
, Jim Deutch used to handle most of the palette questions around here.
Hope this helps,

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://www20.brinkster.com/EDais/


 
 
 

1. Colors: 256 vs High Color

Apologies if this is a FAQ question....

I've noticed that many graphics, especially ones with large areas of
graduating colors, when viewed in a web browser w/a monitor set at
256color, look grainy. Sometimes the graininess is acceptable, sometimes
it's not. I know that saving as GIF's sometimes helps the problem, but then
again, sometimes it doesn't.
I also know about 'browser safe' palettes but haven't really followed
that...does that make a difference inthe graininess I'm seeing?
or is it fairly inherent with 256color and things like photos/non-solid
color images?
Advice?
Thanks!

--
Due to high volume of spam, email address given is
not a real one. At this time, I'm not mixing mail and news.

2. More than 4 colours separations?

3. 16 colors vs 256 colors

4. Help with chromed images

5. 16 bit color vs 256 colors

6. Room Lighting

7. VB Visual Basic 256 COLOR BMP FILES ?!?!?

8. VB and 256 Color?

9. Help! VB's Palette at 256 Colors

10. jpg showing only in 256 color with VB 5 picture box help

11. play 256 colors FLC on 256 color bmp ???

12. Designing web graphics -- 16 vs. 256 colors