Obtaining photo 'stars' rating using PHP
- by DarwinIcesurfer
I am trying to extract the photo 'stars' rating from .jpg files using php code. My intent is to show the highest rated images as part of a slideshow. I found that using the PHP_JPEG_Metadata_Toolkit_1.11 I am able to get the rating of the file if the rating is set from within Vista (Right click - Properties - Details - Set rating by clicking on stars) by reading the array returned by the Metadata_Toolkit
$exif = get_EXIF_JPEG( $photodir . "/" . $filename );
$rating = $exif[0][18246]['Data'][0];
However if I set the rating using Adobe Bridge, I can see the 'stars' in Vista, but the $exif[0][18246]['Data'][0] returns a null value.
Is PHP code available to read the ratings applied by both Windows Vista AND Adobe Bridge?