imagick icon indicating copy to clipboard operation
imagick copied to clipboard

PHP Imagick::readImageFile NEF filehandle detected as TIFF

Open t-rutter opened this issue 1 year ago • 9 comments

Try to read an open filehandle results in imagemagick detect the fiel as a TIFF and then only reads the low-res preview. ` $filename='_X000001.NEF'; $preview='_X000001.jpg' $fh = fopen("/src-dir/$filename", "r"); $im->readImageFile($fh); $imageinfo = $im->identifyImage(); $im->resizeImage(1024, 768, Imagick::FILTER_LANCZOS, 1); $im->setImageFormat('jpg'); $im->writeImage("/dst-dir/$preview"); $im->clear(); $im->destroy();

// do other stuff with source file

fclose($fh); ` results in $imageinfo showing format = "TIFF (Tagged Image File Format)" and the output jpg is super blurry as it end being scaled up from the NEF preview a tiny 160x120px, instead of the full size NEF 3280x4928

t-rutter avatar Aug 13 '24 04:08 t-rutter

I'm encountering the same issue with NEF pictures within the Memories app of Nextcloud. They are using readImageBlob which picks the TIFF thumbnail instead of the source file (for ref: https://github.com/pulsejet/memories/issues/1054)

mnogueron avatar Oct 19 '24 08:10 mnogueron

Hi, I won't be able to fix this in Imagick. Imagick is a thin wrapper around ImageMagick and so Imagick doesn't do any of the image processing itself.

I'd suggest reporting the issue at https://github.com/ImageMagick/ImageMagick

But also:

  1. Try to replicate the issue using the command line ImageMagick tools. If you can do that, the maintainers of ImageMagick are far more likely to look at the issue quickly.

  2. If you can't reproduce via the command line, making an example standalone C problem is another way of getting the ImageMagick maintainers to look at the problem. There's an example stub program you could base something on here: https://github.com/Imagick/imagemagicktest/blob/0be293bb3bf2b4bc6def249d585fb13f6572db1a/svgtest.c

If those fail, and the ImageMagick maintainers don't do anything, then post an example file here (I guess zipped up to get past githubs upload rules).

Danack avatar Oct 19 '24 15:10 Danack

@Danack Thanks for the reply, I'll look into your recommendations when I have some free time. If you want to check some example files I've sent some zipped files in this issue on Memories: https://github.com/pulsejet/memories/issues/1054

mnogueron avatar Dec 17 '24 22:12 mnogueron

I know that this is not a bug in Imagick but keeping this open as it might be good not to forget about possible upstream issue and possibly some support to report it there.

bukka avatar May 09 '25 21:05 bukka

@Danack I've quickly hacked 2 tests:

  1. With your test repo creating a new standalone C file: https://github.com/mnogueron/imagemagicktest/blob/master/dngLowTIFF.c
  2. With the CLI

Both solutions works fine (I'm using ImageMagick-7.1.2-3) and produce good quality files, even with the NEF / DNG input.

However, using this code snippet in the PHP interactive shell, still yield bad quality files:

$file_path = 'my_picture.DNG';
$blob = file_get_contents($file_path);
$image = new Imagick();
$image->readImageBlob($blob);
$image->setImageFormat('jpeg');
$image->setImageCompressionQuality(85);
$image->writeImage('preview-output.jpg');

I'll keep investigating why there is a difference between ImageMagick and imagick.

mnogueron avatar Sep 06 '25 23:09 mnogueron

@mnogueron assuming you're on some kind of Linux, I'd suggest running both versions through strace so that you can see exactly what your system is doing.

There could be differences in your delegates.xml file or which versions of libraries are actually being used.

You could also look at turning on ImageMagick logging. Which apparently might be configurable through MAGICK_DEBUG - though I'm not familiar with that at all.

Danack avatar Sep 07 '25 15:09 Danack

@Danack I've been running both versions through strace and there is indeed something wrong in there.

PHP script:

...
newfstatat(AT_FDCWD, "non_working_test.DNG", {st_mode=S_IFREG|0755, st_size=21802680, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(AT_FDCWD, "non_working_test.DNG", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=21802680, ...}) = 0
lseek(4, 0, SEEK_CUR)                   = 0
fstat(4, {st_mode=S_IFREG|0755, st_size=21802680, ...}) = 0
mmap(NULL, 21811200, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x72c9d7660000
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0x72c9d7660000, 21811200, "zend_alloc") = 0
munmap(0x72c9d7660000, 21811200)        = 0
mmap(NULL, 23904256, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x72c9d7461000
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0x72c9d7461000, 23904256, "zend_alloc") = 0
munmap(0x72c9d7461000, 1699840)         = 0
munmap(0x72c9d8acd000, 393216)          = 0
read(4, "II*\0\10\0\0\0=\0\376\0\4\0\1\0\0\0\1\0\0\0\0\1\4\0\1\0\0\0\0\1"..., 21810872) = 21802680
read(4, "", 8192)                       = 0
read(4, "", 8192)                       = 0
munmap(0x72c9d8acb000, 8192)            = 0
close(4)                                = 0
times({tms_utime=2 /* 0.02 s */, tms_stime=6 /* 0.06 s */, tms_cutime=0, tms_cstime=0}) = 826475879
readlink("/usr", 0x7ffdc2b39860, 1023)  = -1 EINVAL (Invalid argument)
readlink("/usr/local", 0x7ffdc2b39860, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib", 0x7ffdc2b39860, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib/ImageMagick-7.1.2", 0x7ffdc2b39860, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI", 0x7ffdc2b39860, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders", 0x7ffdc2b39860, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/tiff.la", 0x7ffdc2b39860, 1023) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/tiff.la", {st_mode=S_IFREG|0755, st_size=1172, ...}, 0) = 0
access("/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/tiff.la", F_OK) = 0
openat(AT_FDCWD, "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/tiff.la", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=1172, ...}) = 0
read(4, "# tiff.la - a libtool library fi"..., 1536) = 1172
read(4, "", 1536)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/tiff.so", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
...

CLI tool:

...
newfstatat(AT_FDCWD, "non_working_test.DNG", {st_mode=S_IFREG|0755, st_size=21802680, ...}, 0) = 0
access("non_working_test.DNG", F_OK)    = 0
newfstatat(AT_FDCWD, "DNG", 0x7ffc7ae189f0, 0) = -1 ENOENT (No such file or directory)
readlink("/usr", 0x7ffc7ae13550, 1023)  = -1 EINVAL (Invalid argument)
readlink("/usr/local", 0x7ffc7ae13550, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib", 0x7ffc7ae13550, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib/ImageMagick-7.1.2", 0x7ffc7ae13550, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI", 0x7ffc7ae13550, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders", 0x7ffc7ae13550, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/dng.la", 0x7ffc7ae13550, 1023) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/dng.la", {st_mode=S_IFREG|0755, st_size=1133, ...}, 0) = 0
access("/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/dng.la", F_OK) = 0
openat(AT_FDCWD, "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/dng.la", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=1133, ...}) = 0
read(3, "# dng.la - a libtool library fil"..., 1536) = 1133
read(3, "", 1536)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/dng.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
...

In the script, the file is interpreted as a TIFF file and uses the TIFF coder, while using the CLI tool, it's correctly flagged as a DNG, and uses the DNG coders. The TIFF coder extracts the very low preview file from the DNG, while the DNG coder simply convert the DNG to a JPEG.

The DNG file type seems to be lost in the process. ~~Checking for getImageFormat() right before setting the new jpeg format, correctly returns DNG, so I don't really see where it get lost.~~ (It's actually flagged as a TIFF, bad reading on my side...)

I'll keep digging deeper!

mnogueron avatar Oct 22 '25 22:10 mnogueron

And here are the logfiles with MAGICK_DEBUG="All" flag.

PHP Script (recognized as TIFF)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<logEntries>
<log>
  <event>2025-10-22T22:30:34+00:00 0:00.036 0.030u 7.1.2 Wand php8.3[866317]: magick-wand.c/NewMagickWand/1092/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.037 0.030u 7.1.2 Wand php8.3[866317]: magick-image.c/MagickReadImageBlob/9047/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.038 0.030u 7.1.2 Cache php8.3[866317]: cache.c/DestroyPixelCache/1082/Cache
  destroy </event>
  <event>2025-10-22T22:30:34+00:00 0:00.038 0.030u 7.1.2 Policy php8.3[866317]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Module; rights=Unrecognized; pattern="TIFF" ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.038 0.030u 7.1.2 Module php8.3[866317]: module.c/OpenModule/1279/Module
  Searching for module "TIFF" using filename "tiff.la"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.039 0.030u 7.1.2 Module php8.3[866317]: module.c/GetMagickModulePath/549/Module
  Searching for coder module file "tiff.la" ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.039 0.030u 7.1.2 Module php8.3[866317]: module.c/OpenModule/1288/Module
  Opening module at path "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/tiff.la"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.041 0.030u 7.1.2 Module php8.3[866317]: module.c/OpenModule/1315/Module
  Method "RegisterTIFFImage" in module "TIFF" at address 0x723c04d2bc00</event>
  <event>2025-10-22T22:30:34+00:00 0:00.041 0.030u 7.1.2 Module php8.3[866317]: module.c/OpenModule/1329/Module
  Method "UnregisterTIFFImage" in module "TIFF" at address 0x723c04d2c030</event>
  <event>2025-10-22T22:30:34+00:00 0:00.042 0.030u 7.1.2 Cache php8.3[866317]: cache.c/DestroyPixelCache/1082/Cache
  destroy </event>
  <event>2025-10-22T22:30:34+00:00 0:00.042 0.030u 7.1.2 Policy php8.3[866317]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Coder; rights=Read; pattern="TIFF" ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.043 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/share/ImageMagick-7/locale.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.043 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/lib/ImageMagick-7.1.2//config-Q16HDRI/locale.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.043 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/etc/ImageMagick-7/locale.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.044 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/share/doc/ImageMagick-7/locale.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.044 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/home/user/.config/ImageMagick/locale.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.044 0.030u 7.1.2 Configure php8.3[866317]: locale.c/LoadLocaleCache/1203/Configure
  Loading locale configure file "/usr/local/share/ImageMagick-7/locale.xml" ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.045 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/share/ImageMagick-7/english.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.045 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/lib/ImageMagick-7.1.2//config-Q16HDRI/english.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.045 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/etc/ImageMagick-7/english.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.046 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/share/doc/ImageMagick-7/english.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.046 0.030u 7.1.2 Locale php8.3[866317]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/home/user/.config/ImageMagick/english.xml"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.046 0.030u 7.1.2 Configure php8.3[866317]: locale.c/LoadLocaleCache/1203/Configure
  Loading locale configure file "/usr/local/share/ImageMagick-7/english.xml" ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.048 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 37393 (0x9211) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.048 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50931 (0xc6f3) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.048 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50932 (0xc6f4) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.048 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50936 (0xc6f8) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.049 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50937 (0xc6f9) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.049 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50938 (0xc6fa) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.049 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50939 (0xc6fb) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.049 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50941 (0xc6fd) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.049 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50942 (0xc6fe) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.050 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50964 (0xc714) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.050 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50965 (0xc715) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.050 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50966 (0xc716) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.050 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50967 (0xc717) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.051 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50969 (0xc719) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.051 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50970 (0xc71a) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.051 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50971 (0xc71b) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.051 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50981 (0xc725) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.052 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50982 (0xc726) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.052 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 51041 (0xc761) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.052 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 51111 (0xc7a7) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.052 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Incorrect count for "DNGPrivateData"; tag ignored. `TIFFFetchNormalTag'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.053 0.030u 7.1.2 Coder php8.3[866317]: tiff.c/ReadTIFFImage/1407/Coder
  Geometry: 256x171</event>
  <event>2025-10-22T22:30:34+00:00 0:00.053 0.030u 7.1.2 Coder php8.3[866317]: tiff.c/ReadTIFFImage/1409/Coder
  Interlace: 1</event>
  <event>2025-10-22T22:30:34+00:00 0:00.053 0.030u 7.1.2 Coder php8.3[866317]: tiff.c/ReadTIFFImage/1411/Coder
  Bits per sample: 8</event>
  <event>2025-10-22T22:30:34+00:00 0:00.053 0.030u 7.1.2 Coder php8.3[866317]: tiff.c/ReadTIFFImage/1413/Coder
  Min sample value: 0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.054 0.030u 7.1.2 Coder php8.3[866317]: tiff.c/ReadTIFFImage/1415/Coder
  Max sample value: 255</event>
  <event>2025-10-22T22:30:34+00:00 0:00.054 0.030u 7.1.2 Coder php8.3[866317]: tiff.c/ReadTIFFImage/1417/Coder
  Photometric interpretation: RGB</event>
  <event>2025-10-22T22:30:34+00:00 0:00.054 0.030u 7.1.2 Coder php8.3[866317]: tiff.c/ReadTIFFImage/1425/Coder
  Image depth: 8</event>
  <event>2025-10-22T22:30:34+00:00 0:00.054 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Wrong data type 3 for "GainControl"; tag ignored. `TIFFReadCustomDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.055 0.030u 7.1.2 Resource php8.3[866317]: resource.c/AcquireUniqueFileResource/579/Resource
  ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.055 0.030u 7.1.2 Resource php8.3[866317]: resource.c/AcquireUniqueFileResource/636/Resource
  /tmp/magick-rU2bJjdT2F9ufb224EN7xfUQR5ROmG5x</event>
  <event>2025-10-22T22:30:34+00:00 0:00.056 0.030u 7.1.2 Resource php8.3[866317]: resource.c/RelinquishUniqueFileResource/1166/Resource
  /tmp/magick-rU2bJjdT2F9ufb224EN7xfUQR5ROmG5x</event>
  <event>2025-10-22T22:30:34+00:00 0:00.057 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 37393 (0x9211) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.057 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50931 (0xc6f3) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.057 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50932 (0xc6f4) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.057 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50936 (0xc6f8) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.058 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50937 (0xc6f9) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.058 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50938 (0xc6fa) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.058 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50939 (0xc6fb) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.058 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50941 (0xc6fd) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.059 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50942 (0xc6fe) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.059 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50964 (0xc714) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.059 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50965 (0xc715) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.059 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50966 (0xc716) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.060 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50967 (0xc717) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.060 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50969 (0xc719) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.060 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50970 (0xc71a) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.060 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50971 (0xc71b) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.060 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50981 (0xc725) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.061 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 50982 (0xc726) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.061 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 51041 (0xc761) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.061 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Unknown field with tag 51111 (0xc7a7) encountered. `TIFFReadDirectory'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.061 0.030u 7.1.2 Exception php8.3[866317]: tiff.c/TIFFWarnings/928/Exception
  Incorrect count for "DNGPrivateData"; tag ignored. `TIFFFetchNormalTag'</event>
  <event>2025-10-22T22:30:34+00:00 0:00.062 0.030u 7.1.2 Pixel php8.3[866317]: pixel.c/SetPixelChannelMask/6322/Pixel
  [0x07ffffff]</event>
  <event>2025-10-22T22:30:34+00:00 0:00.062 0.030u 7.1.2 Pixel php8.3[866317]: pixel.c/LogPixelChannels/6206/Pixel
  [0x07ffffff]</event>
  <event>2025-10-22T22:30:34+00:00 0:00.062 0.030u 7.1.2 Pixel php8.3[866317]: pixel.c/LogPixelChannels/6303/Pixel
    0: red (update)</event>
  <event>2025-10-22T22:30:34+00:00 0:00.063 0.030u 7.1.2 Pixel php8.3[866317]: pixel.c/LogPixelChannels/6303/Pixel
    1: green (update)</event>
  <event>2025-10-22T22:30:34+00:00 0:00.063 0.030u 7.1.2 Pixel php8.3[866317]: pixel.c/LogPixelChannels/6303/Pixel
    2: blue (update)</event>
  <event>2025-10-22T22:30:34+00:00 0:00.063 0.030u 7.1.2 Resource php8.3[866317]: resource.c/AcquireMagickResource/385/Resource
  Area: 43776B/0B/14.8891GiB</event>
  <event>2025-10-22T22:30:34+00:00 0:00.063 0.030u 7.1.2 Resource php8.3[866317]: resource.c/AcquireMagickResource/385/Resource
  Memory: 525312B/525312B/3.72229GiB</event>
  <event>2025-10-22T22:30:34+00:00 0:00.064 0.030u 7.1.2 Cache php8.3[866317]: cache.c/OpenPixelCache/3865/Cache
  open [0] (Heap Memory, 256x171x3 525312B)</event>
  <event>2025-10-22T22:30:34+00:00 0:00.065 0.030u 7.1.2 Exception php8.3[866317]: xml-tree.c/NewXMLTree/2041/Exception
  ParseError missing ></event>
  <event>2025-10-22T22:30:34+00:00 0:00.065 0.030u 7.1.2 Wand php8.3[866317]: magick-image.c/MagickSetImageFilename/10497/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.065 0.030u 7.1.2 Wand php8.3[866317]: magick-wand.c/MagickSetLastIterator/976/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.066 0.040u 7.1.2 Wand php8.3[866317]: magick-image.c/MagickGetNumberImages/6244/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.066 0.040u 7.1.2 Wand php8.3[866317]: magick-image.c/MagickSetImageFormat/10583/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.066 0.040u 7.1.2 Policy php8.3[866317]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Module; rights=Unrecognized; pattern="JPEG" ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.066 0.040u 7.1.2 Module php8.3[866317]: module.c/OpenModule/1279/Module
  Searching for module "JPEG" using filename "jpeg.la"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.066 0.040u 7.1.2 Module php8.3[866317]: module.c/GetMagickModulePath/549/Module
  Searching for coder module file "jpeg.la" ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.067 0.040u 7.1.2 Module php8.3[866317]: module.c/OpenModule/1288/Module
  Opening module at path "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/jpeg.la"</event>
  <event>2025-10-22T22:30:34+00:00 0:00.069 0.040u 7.1.2 Module php8.3[866317]: module.c/OpenModule/1315/Module
  Method "RegisterJPEGImage" in module "JPEG" at address 0x723c03a20a60</event>
  <event>2025-10-22T22:30:34+00:00 0:00.069 0.040u 7.1.2 Module php8.3[866317]: module.c/OpenModule/1329/Module
  Method "UnregisterJPEGImage" in module "JPEG" at address 0x723c03a20d70</event>
  <event>2025-10-22T22:30:34+00:00 0:00.069 0.040u 7.1.2 Wand php8.3[866317]: magick-image.c/MagickGetNumberImages/6244/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.069 0.040u 7.1.2 Wand php8.3[866317]: magick-image.c/MagickSetImageCompressionQuality/10268/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.070 0.040u 7.1.2 Wand php8.3[866317]: magick-image.c/MagickGetNumberImages/6244/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.070 0.040u 7.1.2 Wand php8.3[866317]: magick-image.c/MagickWriteImage/13363/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.070 0.040u 7.1.2 Policy php8.3[866317]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Coder; rights=Write; pattern="JPG" ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.071 0.040u 7.1.2 Policy php8.3[866317]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Path; rights=Write; pattern="script-test-output.jpg" ...</event>
  <event>2025-10-22T22:30:34+00:00 0:00.071 0.040u 7.1.2 Coder php8.3[866317]: jpeg.c/WriteJPEGImage_/2526/Coder
  Image resolution: 0,0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.071 0.040u 7.1.2 Resource php8.3[866317]: resource.c/AcquireMagickResource/385/Resource
  Memory: 131328B/656640B/3.72229GiB</event>
  <event>2025-10-22T22:30:34+00:00 0:00.072 0.040u 7.1.2 Resource php8.3[866317]: resource.c/RelinquishMagickResource/1127/Resource
  Memory: 131328B/525312B/3.72229GiB</event>
  <event>2025-10-22T22:30:34+00:00 0:00.072 0.040u 7.1.2 Coder php8.3[866317]: jpeg.c/WriteJPEGImage_/2623/Coder
  Interlace: non-progressive</event>
  <event>2025-10-22T22:30:34+00:00 0:00.072 0.040u 7.1.2 Coder php8.3[866317]: jpeg.c/WriteJPEGImage_/2637/Coder
  Quality: 85</event>
  <event>2025-10-22T22:30:34+00:00 0:00.072 0.040u 7.1.2 Coder php8.3[866317]: jpeg.c/WriteJPEGImage_/2885/Coder
  Storage class: DirectClass</event>
  <event>2025-10-22T22:30:34+00:00 0:00.073 0.040u 7.1.2 Coder php8.3[866317]: jpeg.c/WriteJPEGImage_/2887/Coder
  Depth: 8</event>
  <event>2025-10-22T22:30:34+00:00 0:00.073 0.040u 7.1.2 Coder php8.3[866317]: jpeg.c/WriteJPEGImage_/2893/Coder
  Number of colors: unspecified</event>
  <event>2025-10-22T22:30:34+00:00 0:00.073 0.040u 7.1.2 Coder php8.3[866317]: jpeg.c/WriteJPEGImage_/2895/Coder
  JPEG data precision: 8</event>
  <event>2025-10-22T22:30:34+00:00 0:00.073 0.040u 7.1.2 Coder php8.3[866317]: jpeg.c/WriteProfiles/2286/Coder
  xmp profile: 7107 bytes</event>
  <event>2025-10-22T22:30:34+00:00 0:00.076 0.040u 7.1.2 Wand php8.3[866317]: magick-wand.c/DestroyMagickWand/168/Wand
  MagickWand-0</event>
  <event>2025-10-22T22:30:34+00:00 0:00.076 0.040u 7.1.2 Cache php8.3[866317]: cache.c/DestroyPixelCache/1082/Cache
  destroy [0]</event>
  <event>2025-10-22T22:30:34+00:00 0:00.076 0.040u 7.1.2 Resource php8.3[866317]: resource.c/RelinquishMagickResource/1127/Resource
  Memory: 525312B/0B/3.72229GiB</event>
</log>
CLI Tool (recognized as DNG)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<logEntries>
<log>
  <event>2025-10-22T22:32:57+00:00 0:00.000 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 6</event>
  <event>2025-10-22T22:32:57+00:00 0:00.002 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 7</event>
  <event>2025-10-22T22:32:57+00:00 0:00.002 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 11</event>
  <event>2025-10-22T22:32:57+00:00 0:00.003 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 8</event>
  <event>2025-10-22T22:32:57+00:00 0:00.003 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 1</event>
  <event>2025-10-22T22:32:57+00:00 0:00.004 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 2</event>
  <event>2025-10-22T22:32:57+00:00 0:00.004 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 3</event>
  <event>2025-10-22T22:32:57+00:00 0:00.005 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 15</event>
  <event>2025-10-22T22:32:57+00:00 0:00.005 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 24</event>
  <event>2025-10-22T22:32:57+00:00 0:00.006 0.000u 7.1.2 Configure magick[866415]: magick.c/RegisterMagickSignalHandler/1457/Configure
  Register handler for signal: 25</event>
  <event>2025-10-22T22:32:57+00:00 0:00.007 0.000u 7.1.2 Configure magick[866415]: client.c/SetClientName/123/Configure
  magick</event>
  <event>2025-10-22T22:32:57+00:00 0:00.007 0.000u 7.1.2 Wand magick[866415]: wandcli.c/AcquireMagickCLI/115/Wand
  MagickWandCLI-0</event>
  <event>2025-10-22T22:32:57+00:00 0:00.007 0.000u 7.1.2 Command magick[866415]: magick-cli.c/MagickImageCommand/1305/Command
  Initializing "magick"</event>
  <event>2025-10-22T22:32:57+00:00 0:00.008 0.000u 7.1.2 Configure magick[866415]: client.c/SetClientName/123/Configure
  magick</event>
  <event>2025-10-22T22:32:57+00:00 0:00.008 0.000u 7.1.2 Command magick[866415]: magick-cli.c/ProcessCommandOptions/617/Command
  at CLI arg 1 - Starting ("non_working_test.DNG")</event>
  <event>2025-10-22T22:32:57+00:00 0:00.008 0.000u 7.1.2 Command magick[866415]: operation.c/CLINoImageOperator/4870/Command
  at CLI arg 1 - NoImage Operator: -read "non_working_test.DNG" ""</event>
  <event>2025-10-22T22:32:57+00:00 0:00.009 0.000u 7.1.2 Configure magick[866415]: utility.c/ExpandFilenames/975/Configure
  Command line: non_working_test.DNG</event>
  <event>2025-10-22T22:32:57+00:00 0:00.009 0.000u 7.1.2 Policy magick[866415]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Module; rights=Unrecognized; pattern="DNG" ...</event>
  <event>2025-10-22T22:32:57+00:00 0:00.009 0.000u 7.1.2 Module magick[866415]: module.c/OpenModule/1279/Module
  Searching for module "DNG" using filename "dng.la"</event>
  <event>2025-10-22T22:32:57+00:00 0:00.010 0.000u 7.1.2 Module magick[866415]: module.c/GetMagickModulePath/549/Module
  Searching for coder module file "dng.la" ...</event>
  <event>2025-10-22T22:32:57+00:00 0:00.010 0.000u 7.1.2 Module magick[866415]: module.c/OpenModule/1288/Module
  Opening module at path "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/dng.la"</event>
  <event>2025-10-22T22:32:57+00:00 0:00.015 0.000u 7.1.2 Module magick[866415]: module.c/OpenModule/1315/Module
  Method "RegisterDNGImage" in module "DNG" at address 0x702999a739a0</event>
  <event>2025-10-22T22:32:57+00:00 0:00.015 0.000u 7.1.2 Module magick[866415]: module.c/OpenModule/1329/Module
  Method "UnregisterDNGImage" in module "DNG" at address 0x702999a74540</event>
  <event>2025-10-22T22:32:57+00:00 0:00.015 0.000u 7.1.2 Policy magick[866415]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Path; rights=Read; pattern="non_working_test.DNG" ...</event>
  <event>2025-10-22T22:32:57+00:00 0:00.016 0.000u 7.1.2 Blob magick[866415]: blob.c/OpenBlob/3480/Blob
    read 3 magic header bytes</event>
  <event>2025-10-22T22:32:57+00:00 0:00.017 0.000u 7.1.2 Cache magick[866415]: cache.c/DestroyPixelCache/1082/Cache
  destroy </event>
  <event>2025-10-22T22:32:57+00:00 0:00.017 0.000u 7.1.2 Policy magick[866415]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Coder; rights=Read; pattern="DNG" ...</event>
  <event>2025-10-22T22:32:57+00:00 0:00.017 0.000u 7.1.2 Policy magick[866415]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Path; rights=Read; pattern="non_working_test.DNG" ...</event>
  <event>2025-10-22T22:32:57+00:00 0:00.018 0.000u 7.1.2 Blob magick[866415]: blob.c/OpenBlob/3480/Blob
    read 3 magic header bytes</event>
  <event>2025-10-22T22:32:57+00:00 0:00.046 0.020u 7.1.2 Pixel magick[866415]: pixel.c/SetPixelChannelMask/6322/Pixel
  non_working_test.DNG[0x07ffffff]</event>
  <event>2025-10-22T22:32:57+00:00 0:00.046 0.020u 7.1.2 Pixel magick[866415]: pixel.c/LogPixelChannels/6206/Pixel
  non_working_test.DNG[0x07ffffff]</event>
  <event>2025-10-22T22:32:57+00:00 0:00.046 0.020u 7.1.2 Pixel magick[866415]: pixel.c/LogPixelChannels/6303/Pixel
    0: red (update)</event>
  <event>2025-10-22T22:32:57+00:00 0:00.047 0.020u 7.1.2 Pixel magick[866415]: pixel.c/LogPixelChannels/6303/Pixel
    1: green (update)</event>
  <event>2025-10-22T22:32:57+00:00 0:00.047 0.020u 7.1.2 Pixel magick[866415]: pixel.c/LogPixelChannels/6303/Pixel
    2: blue (update)</event>
  <event>2025-10-22T22:32:57+00:00 0:00.047 0.020u 7.1.2 Resource magick[866415]: resource.c/AcquireMagickResource/385/Resource
  Area: 23.041MiB/0B/14.8891GiB</event>
  <event>2025-10-22T22:32:57+00:00 0:00.047 0.020u 7.1.2 Resource magick[866415]: resource.c/AcquireMagickResource/385/Resource
  Memory: 276.492MiB/276.492MiB/3.72229GiB</event>
  <event>2025-10-22T22:32:57+00:00 0:00.048 0.020u 7.1.2 Cache magick[866415]: cache.c/OpenPixelCache/3865/Cache
  open non_working_test.DNG[0] (Heap Memory, 6016x4016x3 276.492MiB)</event>
  <event>2025-10-22T22:33:01+00:00 0:04.255 7.910u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/share/ImageMagick-7/locale.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.255 7.910u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/lib/ImageMagick-7.1.2//config-Q16HDRI/locale.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.256 7.920u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/etc/ImageMagick-7/locale.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.256 7.920u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/share/doc/ImageMagick-7/locale.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.256 7.920u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/home/user/.config/ImageMagick/locale.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.256 7.920u 7.1.2 Configure magick[866415]: locale.c/LoadLocaleCache/1203/Configure
  Loading locale configure file "/usr/local/share/ImageMagick-7/locale.xml" ...</event>
  <event>2025-10-22T22:33:01+00:00 0:04.257 7.920u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/share/ImageMagick-7/english.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.258 7.920u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/lib/ImageMagick-7.1.2//config-Q16HDRI/english.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.258 7.920u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/etc/ImageMagick-7/english.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.258 7.920u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/usr/local/share/doc/ImageMagick-7/english.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.259 7.920u 7.1.2 Locale magick[866415]: locale.c/GetLocaleOptions/842/Locale
  Searching for locale file: "/home/user/.config/ImageMagick/english.xml"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.259 7.920u 7.1.2 Configure magick[866415]: locale.c/LoadLocaleCache/1203/Configure
  Loading locale configure file "/usr/local/share/ImageMagick-7/english.xml" ...</event>
  <event>2025-10-22T22:33:01+00:00 0:04.261 7.930u 7.1.2 Exception magick[866415]: xml-tree.c/NewXMLTree/2041/Exception
  ParseError missing ></event>
  <event>2025-10-22T22:33:01+00:00 0:04.262 7.930u 7.1.2 Wand magick[866415]: wandcli.c/CLICatchException/226/Wand
  magick-CLI</event>
  <event>2025-10-22T22:33:01+00:00 0:04.262 7.930u 7.1.2 Command magick[866415]: operation.c/CLISettingOptionInfo/453/Command
  at CLI arg 2 - Setting Option: -quality "85" "(null)"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.262 7.930u 7.1.2 Wand magick[866415]: wandcli.c/CLICatchException/226/Wand
  magick-CLI</event>
  <event>2025-10-22T22:33:01+00:00 0:04.263 7.930u 7.1.2 Wand magick[866415]: wandcli.c/CLICatchException/226/Wand
  magick-CLI</event>
  <event>2025-10-22T22:33:01+00:00 0:04.263 7.930u 7.1.2 Command magick[866415]: operation.c/CLINoImageOperator/4870/Command
  at CLI arg 4 - NoImage Operator: -write "working_test.jpg" ""</event>
  <event>2025-10-22T22:33:01+00:00 0:04.263 7.930u 7.1.2 Policy magick[866415]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Module; rights=Unrecognized; pattern="JPEG" ...</event>
  <event>2025-10-22T22:33:01+00:00 0:04.264 7.930u 7.1.2 Module magick[866415]: module.c/OpenModule/1279/Module
  Searching for module "JPEG" using filename "jpeg.la"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.264 7.930u 7.1.2 Module magick[866415]: module.c/GetMagickModulePath/549/Module
  Searching for coder module file "jpeg.la" ...</event>
  <event>2025-10-22T22:33:01+00:00 0:04.265 7.930u 7.1.2 Module magick[866415]: module.c/OpenModule/1288/Module
  Opening module at path "/usr/local/lib/ImageMagick-7.1.2/modules-Q16HDRI/coders/jpeg.la"</event>
  <event>2025-10-22T22:33:01+00:00 0:04.266 7.930u 7.1.2 Module magick[866415]: module.c/OpenModule/1315/Module
  Method "RegisterJPEGImage" in module "JPEG" at address 0x702995c93a60</event>
  <event>2025-10-22T22:33:01+00:00 0:04.266 7.930u 7.1.2 Module magick[866415]: module.c/OpenModule/1329/Module
  Method "UnregisterJPEGImage" in module "JPEG" at address 0x702995c93d70</event>
  <event>2025-10-22T22:33:01+00:00 0:04.267 7.930u 7.1.2 Policy magick[866415]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Coder; rights=Write; pattern="JPG" ...</event>
  <event>2025-10-22T22:33:01+00:00 0:04.267 7.930u 7.1.2 Policy magick[866415]: policy.c/IsRightsAuthorized/656/Policy
  Domain: Path; rights=Write; pattern="working_test.jpg" ...</event>
  <event>2025-10-22T22:33:01+00:00 0:04.269 7.930u 7.1.2 Coder magick[866415]: jpeg.c/WriteJPEGImage_/2526/Coder
  Image resolution: 0,0</event>
  <event>2025-10-22T22:33:01+00:00 0:04.269 7.930u 7.1.2 Resource magick[866415]: resource.c/AcquireMagickResource/385/Resource
  Memory: 69.123MiB/345.615MiB/3.72229GiB</event>
  <event>2025-10-22T22:33:01+00:00 0:04.269 7.930u 7.1.2 Resource magick[866415]: resource.c/RelinquishMagickResource/1127/Resource
  Memory: 69.123MiB/276.492MiB/3.72229GiB</event>
  <event>2025-10-22T22:33:01+00:00 0:04.270 7.930u 7.1.2 Coder magick[866415]: jpeg.c/WriteJPEGImage_/2623/Coder
  Interlace: non-progressive</event>
  <event>2025-10-22T22:33:01+00:00 0:04.270 7.930u 7.1.2 Coder magick[866415]: jpeg.c/WriteJPEGImage_/2637/Coder
  Quality: 85</event>
  <event>2025-10-22T22:33:01+00:00 0:04.270 7.930u 7.1.2 Coder magick[866415]: jpeg.c/WriteJPEGImage_/2885/Coder
  Storage class: DirectClass</event>
  <event>2025-10-22T22:33:01+00:00 0:04.271 7.930u 7.1.2 Coder magick[866415]: jpeg.c/WriteJPEGImage_/2887/Coder
  Depth: 16</event>
  <event>2025-10-22T22:33:01+00:00 0:04.271 7.930u 7.1.2 Coder magick[866415]: jpeg.c/WriteJPEGImage_/2893/Coder
  Number of colors: unspecified</event>
  <event>2025-10-22T22:33:01+00:00 0:04.271 7.930u 7.1.2 Coder magick[866415]: jpeg.c/WriteJPEGImage_/2895/Coder
  JPEG data precision: 8</event>
  <event>2025-10-22T22:33:01+00:00 0:04.271 7.930u 7.1.2 Coder magick[866415]: jpeg.c/WriteProfiles/2286/Coder
  xmp profile: 7107 bytes</event>
  <event>2025-10-22T22:33:02+00:00 0:05.033 8.620u 7.1.2 Command magick[866415]: magick-cli.c/MagickImageCommand/1400/Command
  Cleanup "magick"</event>
  <event>2025-10-22T22:33:02+00:00 0:05.033 8.620u 7.1.2 Command magick[866415]: magick-cli.c/MagickImageCommand/1443/Command
  Exiting "magick"</event>
  <event>2025-10-22T22:33:02+00:00 0:05.034 8.620u 7.1.2 Wand magick[866415]: wandcli.c/DestroyMagickCLI/148/Wand
  magick-CLI</event>
  <event>2025-10-22T22:33:02+00:00 0:05.034 8.620u 7.1.2 Cache magick[866415]: cache.c/DestroyPixelCache/1082/Cache
  destroy non_working_test.DNG[0]</event>
  <event>2025-10-22T22:33:02+00:00 0:05.057 8.640u 7.1.2 Resource magick[866415]: resource.c/RelinquishMagickResource/1127/Resource
  Memory: 276.492MiB/0B/3.72229GiB</event>
</log>

mnogueron avatar Oct 22 '25 22:10 mnogueron

Directly reading a NEF or DNG file using readImage correctly resolves the right file type and Imagemagick picks up the DNG coder.However readImageBlob loses this information and picks up the magic byte for DNG files (II being TIFF files).

I tried passing a filename to readImageBlob to imitate the same behaviour, but the image is still interpreted as TIFF.

mnogueron avatar Oct 24 '25 10:10 mnogueron