From 217261c97fbbe3d4ef5912161c4703ca6e74aab8 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 7 Jun 2015 06:17:14 +0000 Subject: Fixed the doc of the Fl_JPEG_Image constructors mentioning the purpose of Fl_Image::fail(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10741 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_JPEG_Image.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_JPEG_Image.cxx b/src/Fl_JPEG_Image.cxx index cd3e4a462..6dd95146a 100644 --- a/src/Fl_JPEG_Image.cxx +++ b/src/Fl_JPEG_Image.cxx @@ -88,7 +88,10 @@ extern "C" { The inherited destructor frees all memory and server resources that are used by the image. - There is no error function in this class. If the image has loaded correctly, + Use Fl_Image::fail() to check if Fl_JPEG_Image failed to load. fail() returns + ERR_FILE_ACCESS if the file could not bo opened or read, ERR_FORMAT if the + JPEG format could not be decoded, and ERR_NO_IMAGE if the image could not + be loaded for another reason. If the image has loaded correctly, w(), h(), and d() should return values greater zero. \param[in] filename a full path and name pointing to a valid jpeg file. @@ -279,7 +282,7 @@ static void jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *data) The inherited destructor frees all memory and server resources that are used by the image. - Use Fl_Image::fail() to check if Fl_BMP_Image failed to load. fail() returns + Use Fl_Image::fail() to check if Fl_JPEG_Image failed to load. fail() returns ERR_FILE_ACCESS if the file could not bo opened or read, ERR_FORMAT if the JPEG format could not be decoded, and ERR_NO_IMAGE if the image could not be loaded for another reason. If the image has loaded correctly, -- cgit v1.2.3