Click to See Complete Forum and Search --> : Graphics


April 20th, 1999, 08:56 AM
Help in understanding graphics. If you create a bmp file in say Microsoft Paint of 320 X 320 Pixels what is the expected file size ?. Is there a formula to compute the file size expected for creating graphic images based on the amount of pixels used and there color value?.

Thanks

JustinE
April 20th, 1999, 09:08 AM
Well, it should simply be x * y (320*320) * the number of bytes per pixel (8bit color = 1 byte, 16bit color = 2 bytes, etc.). So a 320x320 16bit image should be 204800 plus a little bit of file format overhead.

April 20th, 1999, 10:03 AM
can you help me with building a short program which will create a view of 320 X 320 16 bit and allow me to set a color value for each pixel using RGB and step through each pixel from left to right until filled with this color value. I'm trying to learn and understand how to use graphics with C++ 6.0, I have the reference library but it offers no programs to try so you can step through and see what the commands are doing, also if you could refer me to better books or web sites I would appreciate it.

Thanks