comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » need some help reading dng files.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
need some help reading dng files. [message #83800] Mon, 01 April 2013 16:02 Go to next message
fututre.keyboard is currently offline  fututre.keyboard
Messages: 10
Registered: September 2009
Junior Member
Hi, Folks

I have some camera raw files in DNG format that I would like to be able to read in IDL. I read that DNG is an open format and is a special kind of TIFF. But I don't really know how to make use of the adobe DNG specification and import the raw data. I tried query_tiff and read_tiff and I can get some information but they are mostly wrong and I don't get any useful data. Any hints? Thanks and have a nice day!

Eugene

IDL8.2> print,query_tiff(imfn,info)
% Loaded DLM: TIFF.
1
IDL8.2> help, info
** Structure <110f5160>, 18 tags, length=144, data length=132, refs=1:
CHANNELS LONG 3
DIMENSIONS LONG Array[2]
HAS_PALETTE INT 0
IMAGE_INDEX LONG 0
NUM_IMAGES LONG 1
PIXEL_TYPE INT 1
TYPE STRING 'TIFF'
BITS_PER_SAMPLE LONG 8
ORIENTATION LONG 1
PLANAR_CONFIG LONG 1
PHOTOMETRIC LONG 2
POSITION FLOAT Array[2]
RESOLUTION FLOAT Array[2]
UNITS LONG 2
TILE_SIZE LONG Array[2]
DESCRIPTION STRING ''
DOCUMENT_NAME STRING ''
DATE_TIME STRING '2013:03:31 10:15:53'
IDL8.2> imdata=read_tiff(imfn)
% READ_TIFF: Incorrect count for "DNGPrivateData"; tag ignored
% Execution halted at: $MAIN$ 1 E:\Users\eugene\IDLWorkspace\idl_source\demo.pro
IDL8.2> print, info.POSITION
0.000000 0.000000
IDL8.2> print,info.resolution
300.000 300.000
IDL8.2> print,info.tile_size
160 1
IDL8.2> print, info.dimensions
160 120
Re: need some help reading dng files. [message #83880 is a reply to message #83800] Wed, 10 April 2013 15:19 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
future.keyboard@gmail.com writes:

> Thank you, Craig! Dcraw works but I am still trying to avoid intermediate files. -Eugene

"Get used to disappointment."

William Goldman, The Princess Bride



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: need some help reading dng files.
Next Topic: Grid help

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:05:49 PDT 2025

Total time taken to generate the page: 0.00640 seconds