Extracting multipage DNG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Jossie
Posts: 25
Joined: 2015-01-31T03:45:52-07:00
Authentication code: 6789

Extracting multipage DNG

Post by Jossie »

Hello,

how do I extract the individual images in a multi-page DNG-file? The documentation states, that an explicit format is required like "dng:image.dng". I have tried this but it did not work.

Many thanks and best wishes

Hermann-Josef
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Extracting multipage DNG

Post by fmw42 »

You do not say what output format you want. ImageMagick does not support writing to DNG.

try

Code: Select all

convert dng:image.dng[0] result.png
[0] is the first page, [1] is the next page.

Or if you want all the pages, since png does not support multi-page format, it will create separate images with -X appended where X=0,1 ....

Code: Select all

convert dng:image.dng result.png
If that does not work, then post your DNG file.

Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
Jossie
Posts: 25
Joined: 2015-01-31T03:45:52-07:00
Authentication code: 6789

Re: Extracting multipage DNG

Post by Jossie »

Thank you for your fast reply.

I am using ImageMagick-7.0.5-0-Q16-x64-static.exe on a Win10 64bit platform.

I have tried "magick convert dng:image.dng[0] test_0.tif" and so on with 1, 2 and 3, but it always extracts the same image. And I know that there are 2 different images in this file from the metadata.

A sample image is here.

Hermann-Josef
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Extracting multipage DNG

Post by fmw42 »

Your link is not accessible. It needs a login. Post to some free hosting service that does not require a login to access it.
Jossie
Posts: 25
Joined: 2015-01-31T03:45:52-07:00
Authentication code: 6789

Re: Extracting multipage DNG

Post by Jossie »

Strange. It should work without login. That the whole issue!

But here is the file again: https://filebin.net/82fzdgw50brlgy93

Hermann-Josef
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Extracting multipage DNG

Post by fmw42 »

ImageMagick only sees one page via identify -verbose. Perhaps ImageMagick cannot handle multi-page DNG formats or the other pages are hidden in some other meta data. The developers will have to comment.
Post Reply