From 67587e23f293dc5fa3242a6e221eeaeff624297c Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Sun, 24 May 2026 20:42:13 +0100 Subject: Ignore Sony DSC placeholder in EXIF ImageDescription Sony cameras write 'SONY DSC' (padded with spaces) into ImageDescription, which was being copied as the image title. Trim and skip this value so filename-derived titles are used instead. Co-Authored-By: Claude Sonnet 4.6 --- includes/classes/FisheyeImage.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/includes/classes/FisheyeImage.php b/includes/classes/FisheyeImage.php index c2a1a25..c26cedd 100755 --- a/includes/classes/FisheyeImage.php +++ b/includes/classes/FisheyeImage.php @@ -212,13 +212,16 @@ class FisheyeImage extends FisheyeBase { // Set some default values based on the Exif data if( !empty( $exifHash['IFD0']['ImageDescription'] ) ) { - if( empty( $pParamHash['title'] ) ) { - $exifTitle = trim( $exifHash['IFD0']['ImageDescription'] ); - if( !empty( $exifTitle ) ) { - $pParamHash['title'] = $exifTitle; + $exifDesc = trim( $exifHash['IFD0']['ImageDescription'] ); + // Sony cameras stamp 'SONY DSC' into ImageDescription — ignore it + if( $exifDesc !== 'SONY DSC' ) { + if( empty( $pParamHash['title'] ) ) { + if( !empty( $exifDesc ) ) { + $pParamHash['title'] = $exifDesc; + } + } elseif( empty( $pParamHash['edit'] ) && !$this->getField( 'data' ) && $pParamHash['title'] != $exifDesc ) { + $pParamHash['edit'] = $exifDesc; } - } elseif( empty( $pParamHash['edit'] ) && !$this->getField( 'data' ) && $pParamHash['title'] != $exifHash['IFD0']['ImageDescription'] ) { - $pParamHash['edit'] = $exifHash['IFD0']['ImageDescription']; } } -- cgit v1.3