Which type of PImage is created when LoadImage is used, and how can I ask it what it is?

When you create a PImage using createImage, you specify the type as RGB, ARGB or ALPHA. When you create a PImage using loadImage, you do not.

So, two very closely related questions.

  • What type of PImage is created, RGB, ARGB or ALPHA? Is there a default? Does it make a flying guess based on the contents of the file? Or…

  • Where should I look, to find about whether/how I can interrogate a PImage about its image type? Assuming that’s a thing I might potentially be able to do. (Which it might not be.).

thanks!

Field PImage::format.

3 Likes