How can get the size of an image as a variable?

The title says it: I want to know how large my image is, because I want to calculate things later on based on those measurements. How can I get the width and height of the image into a flow variable?

Hi M42,

you can use the image properties -> collection splitter -> row to variable.

Does that work?



Not quite. The Information is just output as a long string like

Image[name=myimage.png;source=;dimensions=2453,3462,3 (X,Y,Channel);min=38,20,0;pixel type=UnsignedByteType)]

Now, I could use some string manipulation to get the dimensions I guess, but isn't there a more elegant way?

If not, how would I do the string manipulation here?

Hi M42,

take a look at the attached example workflow that demonstrates Christian's answer.



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.