EXIF - Samsung Camera


New member
(Not sure this is appropriate but I can't find the information elsewhere)

I have written a program in php to read the EXIF data from my images. It worked fine until I started reading data from images taken with a Samsung camera. It is not finding the EXIFImageWidth and EXIFImageLength data. Whereas the image from an Apple phone has 24 names in the EXIF section, the Samsung data only has 2. I can read the EXIF data using online tools and image processing software, but I want to store the image in a database.

Thanks in advance
To address this issue and ensure compatibility with different camera models, you can consider the following approaches:
Look for alternate EXIF tags.
Some camera models may use alternative tags for certain EXIF attributes such as image width and length. For example, instead of EXIFImageWidth, you can use PixelXDimension or ImageWidth. If you can't find the standard tags, you can modify your PHP program to look for these alternative tags. Libraries such as PHP Exif allow you to access and process EXIF data by providing functions such as exif_read_data() to retrieve the information.
Uses a robust EXIF library.
Consider using a more robust EXIF library that can handle a wider range of EXIF variations and specific camera models. The PHP Exif library above is a good starting point, but you can explore other libraries such as PHP ExifTool and PHP Exif Reader for additional features and better compatibility with different camera models. Properly handle missing EXIF data.
If certain EXIF attributes are missing from Samsung camera images, a PHP program can easily handle such scenarios. For example, you can assign a default value or display a specific message that information is not available. This allows the program to continue processing and saving available EXIF data while taking into account the missing attributes.
Use an external tool or API.
As mentioned earlier, online tools and image processing software can be used to successfully extract the desired EXIF information from Samsung camera images. If the PHP library cannot fetch the required EXIF attributes, you can consider using an external tool or API to extract the information separately. You can call these tools or APIs from your PHP program to retrieve the missing EXIF data and store it in your database.