// Create an image from empty datavariable tImage asImageputimagefromdata (theemptydata) into tImage// Before attempting to load the image it is assumed to be validvariable tValid asBooleanput tImage is valid into tValid// tValid now contains True// Get the width of the image, this will fail, returning 0 and marking the image as invalidvariable tWidth asNumberputthewidthof tImage into tWidth// tWidth now contains 0put tImage is valid into tValid// tValid now contains False