New Image class and nonexistent


I upgraded to the latest version and had to change some code related to the changes in Image.

All is fine except the “invalid Image” idiom which was solved by checking against a NULL pointer and now has no equivalent. Having a “nonexistent” or equivalent mechanism to create empty Images (like in File) would really help.

[code]struct Foo {
Image snapshot_;

Foo foo;

if (foo.snapshot_ == Image::nonexistent) {
// create snapshot


It already does that - Image() creates a null image, and you’ve got Image::isNull() and image::isValid() to test it. I guess I could also add a static Image::null object to improve code clarity.


Ok, nice.

I think the API doc is not in sync then. I do not know if this API doc is meant to display edge or stable.



Yes, the online docs will be out-of-date - they’re built from the last stable release.