Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

pictures with 256 color only

Posted on 2001-06-22
12
Medium Priority
?
200 Views
Last Modified: 2012-05-04
Is there a way i can follow so i can use pictures with true color inside the visual basic programs , when i try to use a true color pictures the colors become bad , is that normal ? Thanx
0
Comment
Question by:ashraf_t
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 3

Expert Comment

by:RodStephens
ID: 6218143
If your system is set up to run only 256 colors, then yes any higher color mode picture you display must be converted to 256 colors. Sometimes that can look bad.

You can change to a higher color mode using the Control Panel's Display applet. For instructions, go to:

    http://www.vb-helper.com/gethigh.htm
0
 

Expert Comment

by:ingem
ID: 6218279
I think, for more precise rendering your true color images and pictures in in 256 colors mode you must use custom PaletteMode. See details in MSDN an article "Managing Multiple Color Palettes". Here is a fragment:
"If you need more precise control over the actual display of colors, you can use a 256-color image to define a custom palette. To do this, assign a 256-color image (.bmp, .cur, .ico, .dib, or .gif) to the Palette property of the form and set the PaletteMode property to Custom. The bitmap doesn?t have to be very large; even a single pixel can define up to 256 colors for the form or picture box. This is because the logical palette of a bitmap can list up to 256 colors, regardless of whether all those colors appear in the bitmap."
And here is an example of appropriate code:

' Assign the palette from Image1 to the form.
Form1.Palette = Image1.Picture
' Use the Custom mode.
Form1.PaletteMode = vbPaletteModeCustom
0
 

Author Comment

by:ashraf_t
ID: 6220104
I did what u said ingem but the no change in colors !!!!
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6220830
Follow RodStephens comment.
Your system is displaying 256 color only, change it.
0
 

Author Comment

by:ashraf_t
ID: 6221802
That is not true my system is true color
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6221982
Strange thing, are you sure that those pictures maintains true color property?
Maybe, those images have been changed.
Picture Box and image controls can display true color values, i think.
0
 

Expert Comment

by:ingem
ID: 6223142
How are your pictures looked out in any Graphic editor on your computer. Are they in normal colors?
0
 

Author Comment

by:ashraf_t
ID: 6245873
Yes any graphic programe show the colors very normal
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6246054
Just for sure, what version of VB are you using?
0
 

Author Comment

by:ashraf_t
ID: 6300302
it is visual basic 5
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 200 total points
ID: 6300898
So, it is enable to show you pictures more than 256 color depth!
At this moment, what depth is your color, 16 bit or 24?
If you are in 16 and pictures are in 24 you got some degrade color pictures. Same is true if you are in 256 and pictures are in 16/24, of course.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6346203
So, that's all?
I can't believe!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question