Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorjohu
    • CommentTimeAug 26th 2008 edited
     
    Hi,
    I wanted to add the Exif tags UserComment and ImageDescription to the fields Caption and Description.

    I added this code into function add_picture plog-admin-functions.php just before the row
    $picture_path = $create_path . "/" . $final_filename;.
    Somewhere round row 113-115....
    It simply overrides anything written in the fields in the upload and import pages.

    // Get EXIF tags for comments and description
    $exif2 = exif_read_data( $final_fqfn, 0, true );
    $caption = $exif2['COMPUTED']['UserComment'];
    $caption = utf8_encode( $caption );
    $desc = $exif2['IFD0']['ImageDescription'];
    $desc = utf8_encode( $desc );


    I had to do the utf8_encode, to display the swedish characters correctly.

    I tried to use the info already captured from "read_exif_data_raw", but I got lot of "strange characters" in the strings. It should probably be possible to use this...

    Jonas
    • CommentAuthorjohu
    • CommentTimeSep 27th 2008
     
    Strange..
    Had got those strange chars when I used read_exif_data_raw...
    What happens if you use that data instead?
    Or maybe you can remove the utf8_encode...