From c8e84c9af35c86ced83a8febfcf2f8c64a76c7a2 Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Tue, 29 Jul 2025 10:25:20 +0200 Subject: [PATCH] More neutral log line for heic --- mobile/apps/photos/lib/utils/image_ml_util.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mobile/apps/photos/lib/utils/image_ml_util.dart b/mobile/apps/photos/lib/utils/image_ml_util.dart index 7d68ec460b..795ff47d60 100644 --- a/mobile/apps/photos/lib/utils/image_ml_util.dart +++ b/mobile/apps/photos/lib/utils/image_ml_util.dart @@ -53,11 +53,16 @@ Future decodeImageFromPath( final Map exifData = await readExifFromBytes(imageData); final int orientation = exifData['Image Orientation']?.values.firstAsInt() ?? 1; - final format = imagePath.split('.').last; + final format = imagePath.split('.').last.toLowerCase(); if (orientation > 1 && includeRgbaBytes) { - _logger.warning( - "Image EXIF orientation $orientation might not work, for format $format", - ); + if (format == 'heic' || format == 'heif') { + _logger + .info("Decoding HEIC/HEIF image with EXIF orientation $orientation"); + } else { + _logger.warning( + "Decoding image with EXIF orientation $orientation, for format $format", + ); + } } late Image image;