Get the width and height of a PNG image or buffer.