diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 78cf42f0..1b69efd2 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -2,8 +2,7 @@ name: Deploy to GitHub Pages on: push: - tags: - - '*' + branches: [ "main" ] # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: diff --git a/README.md b/README.md index 8045f62d..7ea05eed 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It's part of [Ashampoo Photos](https://ashampoo.com/photos). * PNG: Read & Write `eXIf` chunk & XMP + Also read non-standard EXIF & IPTC from `tEXt`/`zTXt` chunk * HEIC / AVIF: Read EXIF & XMP -* JPEG XL: Read EXIF & XMP +* JPEG XL: Read EXIF & XMP of uncompressed files * TIFF / DNG / RAW: Read EXIF & XMP + Good support for Canon CR2, Fujifilm RAF & Adobe DNG + Experimental support for NEF, ARW, RW2 & ORF with known issues @@ -141,6 +141,7 @@ val newBytes = Kim.updateThumbnail( * Inability to update EXIF, IPTC and XMP in JPG files simultaneously. * Does not read the image size and orientation for HEIC, AVIF & JPEG XL +* Does not read brotli compressed metadata of JPEG XL due to missing brotli KMP libs ### Regarding HEIC & AVIF metadata diff --git a/src/commonTest/kotlin/com/ashampoo/kim/common/PhotoMetadataConverterTest.kt b/src/commonTest/kotlin/com/ashampoo/kim/common/PhotoMetadataConverterTest.kt index aca718de..9fd0e082 100644 --- a/src/commonTest/kotlin/com/ashampoo/kim/common/PhotoMetadataConverterTest.kt +++ b/src/commonTest/kotlin/com/ashampoo/kim/common/PhotoMetadataConverterTest.kt @@ -38,8 +38,13 @@ class PhotoMetadataConverterTest { val metadataMap = mutableMapOf() - for (index in 1..KimTestData.TEST_PHOTO_COUNT) + for (index in 1..KimTestData.TEST_PHOTO_COUNT) { + + if (index == KimTestData.JXL_NAKED_CODESTREAM_INDEX) + continue + calculateAndAppendMetadata(index, metadataMap) + } assertEquals( expected = KimTestData.getMetadataCsvString(), diff --git a/src/commonTest/kotlin/com/ashampoo/kim/model/ImageFormatTest.kt b/src/commonTest/kotlin/com/ashampoo/kim/model/ImageFormatTest.kt index f009b904..8ad3ed93 100644 --- a/src/commonTest/kotlin/com/ashampoo/kim/model/ImageFormatTest.kt +++ b/src/commonTest/kotlin/com/ashampoo/kim/model/ImageFormatTest.kt @@ -57,7 +57,7 @@ class ImageFormatTest { index == KimTestData.HEIC_TEST_IMAGE_FROM_JPG_USING_IMAGEMAGICK_INDEX -> ImageFormat.HEIC index == KimTestData.HEIC_TEST_IMAGE_FROM_JPG_USING_APPLE_INDEX -> ImageFormat.HEIC index == KimTestData.HEIC_TEST_IMAGE_FROM_SAMSUNG_INDEX -> ImageFormat.HEIC - index == KimTestData.JXL_NAKED_BYTESTREAM_UNCOMPRESSED_INDEX -> ImageFormat.JXL + index == KimTestData.JXL_NAKED_CODESTREAM_INDEX -> null index == KimTestData.JXL_CONTAINER_UNCOMPRESSED_INDEX -> ImageFormat.JXL index == KimTestData.JXL_CONTAINER_COMPRESSED_INDEX -> ImageFormat.JXL else -> null diff --git a/src/commonTest/kotlin/com/ashampoo/kim/testdata/KimTestData.kt b/src/commonTest/kotlin/com/ashampoo/kim/testdata/KimTestData.kt index 20fd6ae9..afb97f15 100644 --- a/src/commonTest/kotlin/com/ashampoo/kim/testdata/KimTestData.kt +++ b/src/commonTest/kotlin/com/ashampoo/kim/testdata/KimTestData.kt @@ -60,7 +60,7 @@ object KimTestData { const val HEIC_TEST_IMAGE_FROM_JPG_USING_IMAGEMAGICK_INDEX: Int = 75 const val HEIC_TEST_IMAGE_FROM_JPG_USING_APPLE_INDEX: Int = 76 const val HEIC_TEST_IMAGE_FROM_SAMSUNG_INDEX: Int = 77 - const val JXL_NAKED_BYTESTREAM_UNCOMPRESSED_INDEX: Int = 78 + const val JXL_NAKED_CODESTREAM_INDEX: Int = 78 const val JXL_CONTAINER_UNCOMPRESSED_INDEX: Int = 79 const val JXL_CONTAINER_COMPRESSED_INDEX: Int = 80 @@ -126,7 +126,7 @@ object KimTestData { DNG_RW2_TEST_IMAGE_INDEX -> "dng" DNG_ORF_TEST_IMAGE_INDEX -> "dng" HIF_TEST_IMAGE_INDEX -> "hif" - JXL_NAKED_BYTESTREAM_UNCOMPRESSED_INDEX -> "jxl" + JXL_NAKED_CODESTREAM_INDEX -> "jxl" JXL_CONTAINER_UNCOMPRESSED_INDEX -> "jxl" JXL_CONTAINER_COMPRESSED_INDEX -> "jxl" else -> "jpg" diff --git a/src/commonTest/resources/com/ashampoo/kim/testdata/full/README.txt b/src/commonTest/resources/com/ashampoo/kim/testdata/full/README.txt index 10a90f6d..030c4c31 100644 --- a/src/commonTest/resources/com/ashampoo/kim/testdata/full/README.txt +++ b/src/commonTest/resources/com/ashampoo/kim/testdata/full/README.txt @@ -16,8 +16,6 @@ pnoto_75.heic = photo_31.jpg converted to HEIC using ImageMagick pnoto_76.heic = photo_1.jpg converted to HEIC using Apple Preview photo_77.heic = Samsung Galaxy S21 5G Ultra OOC-HEIC -# FIXME Doubled with photo_79.jxl due to a mistake -# photo_78.jxl = photo_6.jpg -> JXL using cjxl without container & without metadata compression - +photo_78.jxl = photo_6.jpg -> JXL naked codestream (converted JPG with GIMP) photo_79.jxl = photo_6.jpg -> JXL using cjxl with container & without metadata compression photo_80.jxl = photo_6.jpg -> JXL using cjxl with container & with metadata compression diff --git a/src/commonTest/resources/com/ashampoo/kim/testdata/full/photo_78.jxl b/src/commonTest/resources/com/ashampoo/kim/testdata/full/photo_78.jxl index 3bb38d7c..daf3bc2f 100644 Binary files a/src/commonTest/resources/com/ashampoo/kim/testdata/full/photo_78.jxl and b/src/commonTest/resources/com/ashampoo/kim/testdata/full/photo_78.jxl differ diff --git a/src/commonTest/resources/com/ashampoo/kim/testdata/metadata.csv b/src/commonTest/resources/com/ashampoo/kim/testdata/metadata.csv index 4b8421cf..b34ad20f 100644 --- a/src/commonTest/resources/com/ashampoo/kim/testdata/metadata.csv +++ b/src/commonTest/resources/com/ashampoo/kim/testdata/metadata.csv @@ -75,6 +75,5 @@ photo_74.avif;null;null;STANDARD;1444567304000;null;null;Canon;Canon EOS 70D;nul photo_75.heic;null;null;STANDARD;1444567304000;null;null;Canon;Canon EOS 70D;null;EF50mm f/1.8 STM;400;0.016666666666666666;3.2;50.0;0;[] photo_76.heic;null;null;STANDARD;1563088871470;55.911316666666664;36.963480555555556;Canon;Canon EOS 70D;null;EF-S55-250mm f/4-5.6 IS STM;250;0.0025;7.1;250.0;0;[dxfoto, published] photo_77.heic;null;null;ROTATE_RIGHT;1696689965871;null;null;samsung;SM-G998B;null;null;640;0.016666666666666666;1.8;6.7;null;[] -photo_78.jxl;null;null;null;1551068056000;null;null;SONY;DSC-RX100;null;28-100mm F1.8-4.9;125;0.004;8.0;10.4;0;[] photo_79.jxl;null;null;null;1551068056000;null;null;SONY;DSC-RX100;null;28-100mm F1.8-4.9;125;0.004;8.0;10.4;0;[] photo_80.jxl;null;null;null;null;null;null;null;null;null;null;null;null;null;null;null;[] diff --git a/src/commonTest/resources/com/ashampoo/kim/testdata/txt/photo_78.txt b/src/commonTest/resources/com/ashampoo/kim/testdata/txt/photo_78.txt index c2c11867..ec747fa4 100644 --- a/src/commonTest/resources/com/ashampoo/kim/testdata/txt/photo_78.txt +++ b/src/commonTest/resources/com/ashampoo/kim/testdata/txt/photo_78.txt @@ -1,334 +1 @@ -File format : JXL -Resolution : null ----- TIFF ---- -Version 42 -Little-endian (Intel, II) ----- Directory IFD0 @ 8 ---- -0000000010 0x010f Make = SONY -0000000022 0x0110 Model = DSC-RX100 -0000000034 0x011a XResolution = 240/1 (240.0) -0000000046 0x011b YResolution = 240/1 (240.0) -0000000058 0x0128 ResolutionUnit = 2 -0000000070 0x0131 Software = Adobe Photoshop Lightroom Classic 8.3.1 (Windows) -0000000082 0x0132 ModifyDate = 2019:08:04 21:22:41 -0000000094 0x8769 ExifOffset = 212 - ----- Directory ExifIFD @ 212 ---- -0000000214 0x829a ExposureTime = 1/250 (0.004) -0000000226 0x829d FNumber = 8/1 (8.0) -0000000238 0x8822 ExposureProgram = 1 -0000000250 0x8827 PhotographicSensitivity = 125 -0000000262 0x8830 SensitivityType = 2 -0000000274 0x8832 RecommendedExposureIndex = 125 -0000000286 0x9000 ExifVersion = [0x30, 0x32, 0x33, 0x31] -0000000298 0x9003 DateTimeOriginal = 2019:02:25 06:14:16 -0000000310 0x9004 DateTimeDigitized = 2019:02:25 06:14:16 -0000000322 0x9010 OffsetTime = +02:00 -0000000334 0x9201 ShutterSpeedValue = 7965784/1000000 (7.965784) -0000000346 0x9202 ApertureValue = 6/1 (6.0) -0000000358 0x9203 BrightnessValue = 17574/2560 (6.864844) -0000000370 0x9204 ExposureCompensation = 0/10 (0.0) -0000000382 0x9205 MaxApertureValue = 434/256 (1.695313) -0000000394 0x9207 MeteringMode = 3 -0000000406 0x9208 LightSource = 0 -0000000418 0x9209 Flash = 15 -0000000430 0x920a FocalLength = 1040/100 (10.4) -0000000442 0xa001 ColorSpace = 1 -0000000454 0xa20e FocalPlaneXResolution = 135838255/32768 (4145.454559) -0000000466 0xa20f FocalPlaneYResolution = 135838255/32768 (4145.454559) -0000000478 0xa210 FocalPlaneResolutionUnit = 3 -0000000490 0xa300 FileSource = 3 -0000000502 0xa301 SceneType = 1 -0000000514 0xa401 CustomRendered = 0 -0000000526 0xa402 ExposureMode = 1 -0000000538 0xa403 WhiteBalance = 0 -0000000550 0xa404 DigitalZoomRatio = 16/16 (1.0) -0000000562 0xa405 FocalLengthIn35mmFormat = 28 -0000000574 0xa406 SceneCaptureType = 0 -0000000586 0xa408 Contrast = 0 -0000000598 0xa409 Saturation = 0 -0000000610 0xa40a Sharpness = 0 -0000000622 0xa432 LensSpecification = [1040/100 (10.4), 3710/100 (37.1), 18/10 (1.8), 49/10 (4.9)] -0000000634 0xa434 LensModel = 28-100mm F1.8-4.9 - ----- Directory SubIFD @ 836 ---- -0000000838 0x0103 Compression = 6 -0000000850 0x011a XResolution = 72/1 (72.0) -0000000862 0x011b YResolution = 72/1 (72.0) -0000000874 0x0128 ResolutionUnit = 2 -0000000886 0x0201 JpgFromRawStart = 930 -0000000898 0x0202 JpgFromRawLength = 11246 - - ----- XMP ---- - - - - - - True - True - 28-100mm F1.8-4.9 - 34683/32768 -219328315/1073741824 52441832/1073741824 -7678158/1073741824 - 1040/100 3710/100 18/10 49/10 - - - - image/jpeg - - - - 28-100mm F1.8-4.9 - - - - 2019-02-25T06:14:16 - - - - 2019-02-25T06:14:16 - Adobe Photoshop Lightroom Classic 8.3.1 (Windows) - 2019-08-04T21:22:41+02:00 - 2019-08-04T21:22:41+02:00 - 0 - - - - - adobe:docid:photoshop:402c59b6-9b47-284c-bf69-c29ff9849814 - xmp.iid:5ed51343-dc41-7a4d-bbc9-d779a5a42cf5 - F44F7718D2EE77F231D30D6F8BD43643 - - xmp.did:ce2000f3-5b24-1346-bf4e-cd945cb900a8 - - - - derived - converted from image/x-sony-arw to image/tiff - - - saved - / - xmp.iid:1b7c7f7f-f2d3-3644-beb2-46bf86b3b9f7 - Adobe Photoshop Camera Raw 11.0 (Windows) - 2019-03-14T22:13:19+01:00 - - - saved - / - xmp.iid:5ed51343-dc41-7a4d-bbc9-d779a5a42cf5 - Adobe Photoshop CC 2019 (Windows) - 2019-03-14T22:29:25+01:00 - - - derived - converted from image/tiff to image/jpeg, saved to new location - - - saved - / - xmp.iid:ce2000f3-5b24-1346-bf4e-cd945cb900a8 - Adobe Photoshop Lightroom Classic 8.3.1 (Windows) - 2019-08-04T21:22:41+02:00 - - - - xmp.iid:ce2000f3-5b24-1346-bf4e-cd945cb900a8 - F44F7718D2EE77F231D30D6F8BD43643 - - - - True - 0 - 0 - 0 - 0 - Embedded - 54650A341B5B5CCAE8442D0B43A92BCE - 0 - 0 - 0 - False - 0 - 60 - 40 - 0 - 70 - 30 - 0 - +0.40 - 0 - 0 - 0 - False - True - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - LensDefaults - - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - False - 0 - 75 - 0 - 0 - 50 - 25 - 0 - 0 - 0 - 0.0 - 100 - 0 - 0 - 0.00 - 0.00 - 0 - 11.0 - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 25 - 0 - +1.0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0, 0 - 255, 255 - - - - - 0, 0 - 255, 255 - - - - - 0, 0 - 255, 255 - - - Linear - Linear - - - 0, 0 - 255, 255 - - - - - 0, 0 - 255, 255 - - - - - 0, 0 - 255, 255 - - - - - 0, 0 - 255, 255 - - - - - 0, 0 - 255, 255 - - - 0 - 0 - 0.5 - 0.5 - 35 - 0 - 0 - False - 6 - 151388160 - 11.3 - 0 - 0 - As Shot - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - +null \ No newline at end of file