Thank you, Greg Ercolano. The problem IS 'file not found'. I put the image files in the âdebugâ directory. But the default VC2005 directory is something different.
Another question is about using libjpeg.lib to save images as .jpg files. I use D. Zimmerâs code. http://www.fltk.org/newsgroups.php?s727+gfltk.opengl+v732+T0 I found out the .jpg fileâs size is relatively large. For example, an output result_0.jpg file is about 30KB. I open it with Windows âPaintâ accessory and save it as another result_1.jpg file. The new result_1.jpg file is only 10KB. Is there anyway to improve D. Zimmerâs code? Thank you very much! Linda > Linda wrote: > > Fl_BMP_Image *bmp = new Fl_BMP_Image("tiny.bmp"); > > count() returns 1; d() returns 3; h() returns 0; w() returns 0. > > Sounds like a 'file not found' or 'permission denied' situation. > Try supplying the absolute path to the images, eg: > > Fl_BMP_Image *bmp = new Fl_BMP_Image("c:/temp/tiny.bmp"); > > I believe the procedure is that after you instance the Fl_*_Image > object, > if you find either w() or h() returns 0, you can 'probably' assume there > was a file load error of some kind; most likely strerror() or perror() > will get you the error message. Unless, that is, the image format itself > is bad. > > I don't think the Fl*Image functions let you differentiate between > a file system error, and a file format error (eg. a corrupted jpeg), > and there's no real error return flag, other than w()/h()/d() coming > back with zero.
_______________________________________________ fltk-opengl mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-opengl
