Get image data from image item in script

Well, @Redsandro showed how he did it above.

There are a number of other posts with solutions of various formats on the forum. Here’s one: Save image item's image to disk - #2 by albauer. Here’s another: OpenWeatherMap Icon - use as image in rule? - #2 by rlkoshak