ImageMagick / ImageMagick/ImageMagick
Batch processing of gain maps does not appear to be possible with IM
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.5k
- Forks
- 1.7k
- Avg merge
- 10h 17m
- Merged PRs (30d)
- 28
Description
ImageMagick version
7.1.2-23
Operating system
MacOS
Operating system, version and so on
26.5
Description
Batch conversion with normal ImageMagick commands like mogrify -resize 50% *.jpg only uses the standard JPEG coder.
It sees and resizes the SDR/base JPEG, but it does not preserve the gain map JPEG aux image or metadata. The result is an SDR JPEG, not a gain-map JPEG (the HDR content is stripped).
Steps to Reproduce
Compile with gain map support:
PKG_CONFIG=/private/tmp/im-release-testing/tools/pkg-config \
IM_RELEASE_LOCAL=/private/tmp/im-release-testing/local \
CPPFLAGS="-I/opt/homebrew/opt/jpeg-turbo/include" \
LDFLAGS="-L/opt/homebrew/opt/jpeg-turbo/lib -L/private/tmp/im-release-testing/local/lib -Wl,-rpath,/private/tmp/im-release-testing/local/lib" \
/private/tmp/im-release-testing/src/ImageMagick-7.1.2-23/configure \
--with-uhdr=yes \
--prefix=/private/tmp/im-release-testing/install
Transcode a JPG gain map using mogrify, the output will no longer have a gain map.
Images
Any gain map could be used, nothing special about this source:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the loss of the gain map with the provided ImageMagick 7.1.2-23 build, using mogrify on a gain-map JPEG compiled with --with-uhdr=yes. Trace the batch conversion path and verify that the resized output preserves the gain-map JPEG auxiliary image and metadata rather than producing SDR-only output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli, computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100