Skip to content

Add Fujifilm Film Simulation support#2

Merged
StefanOltmann merged 7 commits into
StefanOltmann:mainfrom
Gnod:feat-fuji-filmmode
May 11, 2026
Merged

Add Fujifilm Film Simulation support#2
StefanOltmann merged 7 commits into
StefanOltmann:mainfrom
Gnod:feat-fuji-filmmode

Conversation

@Gnod

@Gnod Gnod commented May 7, 2026

Copy link
Copy Markdown
Contributor

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

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
Copilot AI review requested due to automatic review settings May 7, 2026 11:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TiffReader to parse Fujifilm MakerNote IFD (little-endian) and PhotoMetadataConverter to 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.

Gnod added 2 commits May 7, 2026 20:04
# 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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to add your name here as it’s a new file under your authorship.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it

@StefanOltmann

Copy link
Copy Markdown
Owner

Thank you a lot for your PR.

I just wonder why there is no change to the TXT files in the unit tests.
The Fujifilm MakerNote should also be part of the output.

Gnod added 2 commits May 9, 2026 19:00
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.
@Gnod

Gnod commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

Thank you a lot for your PR.

I just wonder why there is no change to the TXT files in the unit tests. The Fujifilm MakerNote should also be part of the output.

I previously ignored the .txt file, but I've now added a corresponding file submission.

@StefanOltmann StefanOltmann merged commit abc299c into StefanOltmann:main May 11, 2026
1 check passed
@StefanOltmann

Copy link
Copy Markdown
Owner

Thank you. Your changes are live on Maven Central.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants