Skip to content

Commit

Permalink
Clarification on JPEG XL support (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanOltmann authored Jan 21, 2024
1 parent 5ce748e commit dc361f3
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 345 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ class PhotoMetadataConverterTest {

val metadataMap = mutableMapOf<String, PhotoMetadata>()

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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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;[]
Loading

0 comments on commit dc361f3

Please sign in to comment.