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