Add Fujifilm Film Simulation support#2
Conversation
This commit adds support for reading Fujifilm Film Simulation parameters from MakerNote metadata in RAF (RAW) and JPEG files. Features: - New FujiFilmTag.kt with MakerNote tag definitions (0x1401 Film Mode) - Support for all known film simulations: - Provia/Standard, Velvia/Vivid, Astia/Soft - Classic Chrome, Classic Negative - Eterna, Bleach Bypass, Nostalgic Neg, Reala ACE - Pro Neg. Std, Pro Neg. Hi - New PhotoMetadata.filmSimulation field - MakerNote parsing for Fujifilm cameras (little-endian IFD) Changes: - Add TIFF_MAKER_NOTE_FUJIFILM constant - Update TiffReader to parse FujiFilm MakerNote format - Update PhotoMetadataConverter to extract film simulation - Add tests for FujiFilm tags and film simulation extraction
There was a problem hiding this comment.
Pull request overview
Adds Fujifilm MakerNote support to extract “Film Simulation / Film Mode” metadata and exposes it via a new PhotoMetadata.filmSimulation field, alongside new tag definitions and tests.
Changes:
- Introduces
FujiFilmTag(MakerNote tag registry) and wires it into TIFF tag lookup. - Extends
TiffReaderto parse Fujifilm MakerNote IFD (little-endian) andPhotoMetadataConverterto extract film simulation. - Adds tests for Fujifilm tag definitions and (partially) for MakerNote/film simulation handling.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/commonTest/kotlin/com/ashampoo/kim/format/tiff/constant/FujiFilmTagTest.kt | Adds unit tests for FujiFilm tag IDs, directory type, and film mode name mapping. |
| src/commonTest/kotlin/com/ashampoo/kim/common/FujiFilmSimulationTest.kt | Adds integration-style tests around parsing Fujifilm MakerNote and film simulation extraction. |
| src/commonMain/kotlin/com/ashampoo/kim/model/PhotoMetadata.kt | Adds filmSimulation field and merges it in PhotoMetadata.merge(). |
| src/commonMain/kotlin/com/ashampoo/kim/format/tiff/TiffTags.kt | Registers Fujifilm MakerNote tags for tag-name/type lookup. |
| src/commonMain/kotlin/com/ashampoo/kim/format/tiff/TiffReader.kt | Adds Fujifilm MakerNote parsing and signature constant; modifies MakerNote error handling. |
| src/commonMain/kotlin/com/ashampoo/kim/format/tiff/TiffDirectory.kt | Adds human-readable directory name for Fujifilm MakerNote directory type. |
| src/commonMain/kotlin/com/ashampoo/kim/format/tiff/constant/TiffDirectoryType.kt | Adds EXIF_DIRECTORY_MAKER_NOTE_FUJIFILM enum value. |
| src/commonMain/kotlin/com/ashampoo/kim/format/tiff/constant/TiffConstants.kt | Adds TIFF_MAKER_NOTE_FUJIFILM artificial directory type constant. |
| src/commonMain/kotlin/com/ashampoo/kim/format/tiff/constant/FujiFilmTag.kt | New Fujifilm MakerNote tag definitions + film mode value-to-name mapping. |
| src/commonMain/kotlin/com/ashampoo/kim/common/PhotoMetadataConverter.kt | Extracts filmSimulation from Fujifilm MakerNote FilmMode tag and sets it in PhotoMetadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # src/commonMain/kotlin/de/stefan_oltmann/kim/common/MetadataSummaryConverter.kt # src/commonMain/kotlin/de/stefan_oltmann/kim/format/tiff/TiffTags.kt # src/commonMain/kotlin/de/stefan_oltmann/kim/format/tiff/constant/FujiFilmTag.kt # src/commonTest/kotlin/de/stefan_oltmann/kim/common/FujiFilmSimulationTest.kt
| @@ -0,0 +1,130 @@ | |||
| /* | |||
| * Copyright 2025 Ashampoo GmbH & Co. KG | |||
There was a problem hiding this comment.
Feel free to add your name here as it’s a new file under your authorship.
There was a problem hiding this comment.
Sorry, I meant your copyright instead of Ashampoo. This is a file you added. You should take solely credit for it.
I will add mine if/when I need to do a major change to the file.
|
Thank you a lot for your PR. I just wonder why there is no change to the TXT files in the unit tests. |
Update media_50.txt and media_58.txt test expectation files to include the new MakerNoteFujiFilm directory in the toString() output. These Fuji JPEG/RAF files now have their MakerNote parsed and included in the metadata dump, showing the FujiFilm MakerNote tags.
I previously ignored the .txt file, but I've now added a corresponding file submission. |
|
Thank you. Your changes are live on Maven Central. |
This commit adds support for reading Fujifilm Film Simulation parameters from MakerNote metadata in RAF (RAW) and JPEG files.
Features:
Changes: