Display width and height of images in Info Dialog

It is using a hacky code to read JPEG and PNG images dimensions,
but it prevents to add a dependency on external lib to do so (ie. PIL).