Improve company productivity with a Business Account.Sign Up

x
?
Solved

pictures with 256 color only

Posted on 2001-06-22
12
Medium Priority
?
208 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

607 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