|
From: Vincent Petruccelli on 5 Jan 2008 06:08 I am using Visual C++ to write a simple computer game, using bitmap images. However, I can only use 16 colors in a given bitmap. If I try to import a bitmap from Paint, which has (say) 256 colours, Visual C++ always reduces the palette down to 16 colors, often ruining the image. Is there any way to tell Visual C++ to allow for more than 16 colors in a bitmap? Any help much appreciated. Thanks.
From: Francis Glassborow on 5 Jan 2008 06:22 Vincent Petruccelli wrote: > I am using Visual C++ to write a simple computer game, using bitmap images. > However, I can only use 16 colors in a given bitmap. If I try to import a > bitmap from Paint, which has (say) 256 colours, Visual C++ always reduces > the palette down to 16 colors, often ruining the image. > > Is there any way to tell Visual C++ to allow for more than 16 colors in a > bitmap? > > Any help much appreciated. Thanks. > > I guess the answer would be yes but this is not the place to ask the question. You need a specialist forum for Visual C++.
From: Alf P. Steinbach on 5 Jan 2008 06:28 * Vincent Petruccelli: > I am using Visual C++ to write a simple computer game, using bitmap images. > However, I can only use 16 colors in a given bitmap. If I try to import a > bitmap from Paint, which has (say) 256 colours, Visual C++ always reduces > the palette down to 16 colors, often ruining the image. > > Is there any way to tell Visual C++ to allow for more than 16 colors in a > bitmap? This is not a language question but a question about using a particular IDE (Integrated Development Environment). Mainly, the answer is to code instead of point-and-click, but check out a Visual C++ forum, e.g. in the microsoft.* hierarchy. How to use a particular IDE, or how to programmatically handle a particular file format, is off-topic here, I'm afraid. Cheers, & hth., - Alf PS: Anyway, you might try setting the files to "read only" in order to discourage tools from "helping" you in the Microsoft way; as I recall Visual Studio will then at least ask before it converts. -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
From: moschops on 5 Jan 2008 08:31 Vincent Petruccelli wrote: > I am using Visual C++ to write a simple computer game, using bitmap images. > However, I can only use 16 colors in a given bitmap. If I try to import a > bitmap from Paint, which has (say) 256 colours, Visual C++ always reduces > the palette down to 16 colors, often ruining the image. > > Is there any way to tell Visual C++ to allow for more than 16 colors in a > bitmap? > > Any help much appreciated. Thanks. > > When you find a better newsgroup to ask in, be sure to explain how you're loading the bitmaps from file and how you're displaying them on screen. Sample code would be a good idea. When you create a blank bitmap object in a windows environment, you have to specify details including the number of bits per pixel. If you're not specifying the right number, you could have trouble.Also, have a look at how you're loading the bitmap object with the data from the file, and check that you are actually reading it to the right bitdepth. 'Chops
From: Richard Heathfield on 5 Jan 2008 10:24 Vincent Petruccelli said: > I am using Visual C++ to write a simple computer game, using bitmap > images. However, I can only use 16 colors in a given bitmap. If I try to > import a bitmap from Paint, which has (say) 256 colours, Visual C++ > always reduces the palette down to 16 colors, often ruining the image. > > Is there any way to tell Visual C++ to allow for more than 16 colors in a > bitmap? Several people have pointed out that this question is OT in acllcc++, but I don't think you've yet been given a good recommendation for a better newsgroup. The best group for such questions, in my opinion, is comp.os.ms-windows.programmer.win32, which is healthily independent of MS and yet chock-full of expertise. I recommend that you subscribe to it. Crossposted to that group, followups set. -- Richard Heathfield <http://www.cpax.org.uk> Email: -http://www. +rjh@ Google users: <http://www.cpax.org.uk/prg/writings/googly.php> "Usenet is a strange place" - dmr 29 July 1999
|
Pages: 1 Prev: Optimizing C/C++ Code. Next: A Dumb Noob Question. error: expected `;' before 'cout'??? |