tests: improved tests for images
Image::getFormatFromString() is deprecated