Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
graceful way to test for a valid image handle such as before doing _FreeImage?
#8
(11-11-2025, 03:34 PM)SMcNeill Wrote: -1 just means it wasn't initialized properly.   For example you try to _LOADIMAGE and spell the name or path wrong, so the file can't be found and can't load.  It doesn't mean it ever existed or was freed properly.   If you need that information, store it as something uniquely obscure like using a SINGLE to hold the value -0.5, or whatnot.
Uniquely obscure, I like it!
Reply


Messages In This Thread
RE: graceful way to test for a valid image handle such as before doing _FreeImage? - by madscijr - 11-11-2025, 03:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Test to post a new Thread + question 32 or 64 bit Rudy M 2 538 09-09-2025, 04:10 PM
Last Post: Rudy M
  A strange experience with forum posting an image TempodiBasic 2 521 06-17-2025, 06:01 AM
Last Post: TempodiBasic
  QB64PE programming challenge? auto-convert image to photoreal etch-a-sketch drawing madscijr 9 1,805 02-14-2025, 05:49 PM
Last Post: madscijr
  Got a slow PC? Test these changes, kindly! SMcNeill 7 1,710 05-16-2024, 09:59 PM
Last Post: grymmjack
  When to free an image? James D Jarvis 5 1,127 04-16-2023, 08:55 PM
Last Post: OldMoses

Forum Jump:


Users browsing this thread: 1 Guest(s)