This function is mainly used internally to decide the width and
height of the SWF file according to the sizes of input images.For jpg/jpeg, png and gif formats, the function returns the image
size in pixels. For svg file, width is always set to 640 px and
height is adjusted according to the width/height ratio. If the
image size could not be determined, then default values (640x640,
in pixels) are used.