Is it possible for OSSN to Convert / Interpret all image files to .jpeg?

Edilton Costa Alves Posted in Technical Support 6 years ago

Today I uploaded a .png image and in Errorlog a PHP Alert "exifread_data (phpqZqtEK): File not supported" in classes / OssnFile.php (line 452).

I checked that for .jpeg and .tiif images the PHP Alert does not occur, so I ask:
Is it possible to make any changes in OSSN so that every image file is converted and interpreted as .jpeg?

Replies
German Michael Zülsdorff Replied 6 years ago

Well, if you look into the code, the exif_read_data function is simply used to retrieve some extra information about the orientation (portrait/landscape) of the uploaded image. In case this information is not available - which may happen with JPGs, too, the physical dimensions of the image will be used instead.

The 'problem': PNG files don't include this information anyway, so converting them to JPGs would be of no help. Again the physical dimensions will be used here.

So actually, nothing is really going wrong, we are just getting a warning back from exif_read_data because the function is unable to handle something which is not in place. Maybe we should put a try -> catch around it to simply suppress that warning....

us Rishi B Replied 6 years ago

i've had no problem with jpg, png, and bmp files also. guessing Arsalan is correct that it's the particular file you're dealing with.

Indonesian Arsalan Shah Replied 6 years ago

PNG files are supported by OSSN, can you upload the file somewhere and send us link? i shall take a look into it, PHP, GIF, JPG, BMP files are supported by OSSN, there seems some special png file you have or its not well formatted.