jdc6029
Mar 22nd, 2002, 10:22 AM
Should be simple for someone. I want to be able to reduce the colors of an image in a Picture Box to 256 before saving.
Gaming_World
Mar 23rd, 2002, 12:08 PM
I do not think that there is a way to do this, you would propbably need to write it your self.
If this is to reduce file size, I am attaching some code to save the file to JPG.
SaveJPG will save a picture or image. The cDib is the picture (or image) property, sFile is file name, and lQuality is the quality of the file (from 1 to ten), although I don't think it makes a differnce.
Or to save to whole screen, call the SaveScreenShot producder. The Name is the save file name, Quality is the same as above, HDC is the HDC of the form or picture box to save (leave it out if you want the whole screen), Width and Height are exactly what their names say.
To use, just insert the two files (a class module and a module) into your project.