Awkward responses in forums...
Monday, 3. July 2006, 22:05:46
What platform are you programming on?
I think this reply means "Well, I am hell of guru but just tell me what platform...". OP asks loading a BMP file, which is heavily used on Microsoft Windows, and this file format is not reputable/famous/usual on UNIX. Secondly, normally a UNIX programmer or sysadmin either already knows, which, in turn, never asks, or, he/she finds tools or source code and he/she is able to read and/or reproduce it. If he/she cannot find, he/she is capable of finding required information on the Internet and properly load file. And finally, loading a BMP file could be performed on all platforms who has standard file IO support, including Pocket PC, Symbian or other proprietary OSs. He asks loading, not displaying it. So it's the very same code that can run on any platform. Hoping code obeys standards.
Hence the equation, people are strange!!
My senior design project was Histogram equalization on images, in particular, X-RAY images, and project was written in C++. I have implemented set of classes that load any picture format whose decoder has been implemented - this was all about polymorphism. The first level type discovery filter, discovers the file type and transfers control to the next stage, format recognizer, which collects basic information about the image, such as color depth, pallette (if one exists), width, height and compression. Finally, image gets loaded with proper load function and extracted data goes into a dedicated class. This project supports BMP (of course), JPG, PNG and TGA formats.








