quietcoder
July 16th, 2002, 02:06 AM
i'm using Dev-C++ 4.
it will compile and i can run the program, however the bmp is not viewable in the preview app. You can open the bmp file in paint.
although its not the intended output for the bitmap, its an error. i've been tying to get this to work for at least a month and i just don't know how to fix this. the jist of the app is that you have an input.txt file with a many ones and zeros and the app will turn it into a bitmap by
asking you what color you want for the zeros (red, green, blue) then it will ask what color do you want for the ones (red, green, blue) now its going to ask if you want to compress the ones and zeros you enter in the number of ones and zeros in a row you want compressed and the colors that will represent the compressed bits then it opens the txt file and calculates the needed width and height of the bitmap. after that it closes and reopens the txt file and reads it and writes the ones and zeros to the bitmap. closes the txt fille and outputs the bitmap.
this project has 'testcompression.cpp' and 'bitmap.cpp' in it using 'bitmap.h', 'iostream.h', 'stdlib.h', and 'fstream.h'. The two files begining with bitmap are found at http://www.csse.monash.edu.au/~tonyj/raytracing/ the only thing i modified was putting " ios::trunc |" infront of " ios::out" on line 56 of 'bitmap.cpp'.
thanks in advance
it will compile and i can run the program, however the bmp is not viewable in the preview app. You can open the bmp file in paint.
although its not the intended output for the bitmap, its an error. i've been tying to get this to work for at least a month and i just don't know how to fix this. the jist of the app is that you have an input.txt file with a many ones and zeros and the app will turn it into a bitmap by
asking you what color you want for the zeros (red, green, blue) then it will ask what color do you want for the ones (red, green, blue) now its going to ask if you want to compress the ones and zeros you enter in the number of ones and zeros in a row you want compressed and the colors that will represent the compressed bits then it opens the txt file and calculates the needed width and height of the bitmap. after that it closes and reopens the txt file and reads it and writes the ones and zeros to the bitmap. closes the txt fille and outputs the bitmap.
this project has 'testcompression.cpp' and 'bitmap.cpp' in it using 'bitmap.h', 'iostream.h', 'stdlib.h', and 'fstream.h'. The two files begining with bitmap are found at http://www.csse.monash.edu.au/~tonyj/raytracing/ the only thing i modified was putting " ios::trunc |" infront of " ios::out" on line 56 of 'bitmap.cpp'.
thanks in advance