Obtaining photo 'stars' rating using PHP

Posted by DarwinIcesurfer on Stack Overflow See other posts from Stack Overflow or by DarwinIcesurfer
Published on 2010-06-11T04:28:19Z Indexed on 2010/06/11 4:32 UTC
Read the original article Hit count: 263

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about php

Related posts about adobe