fire-eggs / YAIV

"Yet Another Image Viewer"
MIT License
3 stars 0 forks source link

Better message when image not shown #98

Open fire-eggs opened 3 years ago

fire-eggs commented 3 years ago

2931273.webp 3017273.jpg

Nope - files removed since image list was built

Nice to have some indication of why the file not showng

fire-eggs commented 1 year ago

Originally reported as a possible failure to show a webp file. What are other possible reasons why an image might not show?

fire-eggs commented 1 year ago

Scenarios, see list_rand.cpp:

  1. fl_fopen() call returns NULL : file missing/can't open (loadfile)
  2. fread of header fail : file empty (loadfile)
  3. headerlen too short - file bad (readImageHeader)
  4. header unknown: unsupported file format (fl_check_images)
  5. image to be returned has fail() status: unable to decode (loadfile)

In XBox::load_current, provide an error string to update_label(). Said error string needs to be exposed from list_rand.cpp.