PHP Classes

Need guidance

Recommend this page to a friend!

      PHP Auto Rotate Image Exif  >  All threads  >  Need guidance  >  (Un) Subscribe thread alerts  
Subject:Need guidance
Summary:Routine works great but throws an error on a .png image
Messages:1
Author:Charles Patton
Date:2021-11-05 04:30:32
 

  1. Need guidance   Reply   Report abuse  
Picture of Charles Patton Charles Patton - 2021-11-05 04:30:32
These routines solved a problem I have been chasing for many days. So, thanks. It is throwing an error when I use it for a .png image. The error is:
"Warning: exif_read_data(Bubby Pics Early Dec 2011 031.png): File not supported in /home/dreamshare/public_html/class.ExifCleaning.php on line 21".

Line 21 is: $codificacionExif = exif_read_data($ficheroDeImagen);

I believe the cause is that the exif_read_data function doesn't work for .png files, which I get. However, I don't now how to work around that line (I write procedural PHP not object-oriented, for one). Can you suggest a line or two of code to eliminate the warning, other than me turning off the "Display Errors" line in my code that would mask any other issues as well.

Any help would be greatly appreciated.