Solved

pictures with 256 color only

Posted on 2001-06-22
12
180 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
Comment Utility
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
Comment Utility
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
Comment Utility
I did what u said ingem but the no change in colors !!!!
0
 
LVL 16

Expert Comment

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

Author Comment

by:ashraf_t
Comment Utility
That is not true my system is true color
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Expert Comment

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

Author Comment

by:ashraf_t
Comment Utility
Yes any graphic programe show the colors very normal
0
 
LVL 16

Expert Comment

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

Author Comment

by:ashraf_t
Comment Utility
it is visual basic 5
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 50 total points
Comment Utility
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
Comment Utility
So, that's all?
I can't believe!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now