$ file myImage.png
Produces this result:
myImage.png: PNG image data, 42 x 64, 8-bit grayscale, non-interlaced
I want to parse the width and the height into variables, something like this:
MY_WIDTH = file myImage.png | grep ???x
MY_HEIGHT = file myImage.png | grep x???