?

Log in

No account? Create an account

Next Entry

Using Panasonic GF1 raws in Aperture

UPDATE: see this post for information about Aperture 3 and the GF1.

A while ago I got a Panasonic GF1. Unfortunately neither the native raw format nor normally converted DNG files are accepted by Apple's raw processing framework. The reason why DNG files aren't accepted is apparently the included lens correction data. Why Apple's library won't just ignore the parts it doesn't understand is unclear.

Anyway, to get the DNG files working, I wrote a simple tool to remove the offending bits from the file.

The binary is available here: www.notcom.org/forum/dngsanitize-1.0.zip

You need to install Adobe DNG Converter 5.5 or later in /Applications. You can get it from www.adobe.com/support/downloads/detail.jsp.
After you have installed the converter, unpack the zip file and run the dngsanitize command in the Terminal. For example, go to the directory where the zip was extracted, copy a G1/GH1/GF1 raw there with the name test.rw2 and enter:

./dngsanitize test.rw2

This will produce a file called testn.dng in the current directory. This file should be viewable in Finder's preview window. See the included README.txt for more information.

I have only tested this with GF1 and the Panasonic 20/1.7. It should work for other cameras and lenses too.

This image is exported from Aperture:



And this is from Silkypix:



White point has been adjusted, otherwise both are exported with default settings. Note how geometric corrections have been applied in the Silkypix image.

Here is the source for dngsanitize if you want to tinker with it: www.notcom.org/forum/dngsanitize-1.0-src.zip

Comments

( 4 comments )
notbrainsurgery
Dec. 29th, 2009 07:54 am (UTC)
lens correction
I am long term Aperture user who bought gf1, so I am very interested in the subject.

Couple of questions:

1. I read in several places people complaining that Adobe DNG converter actually applies lens correction to DNG. People do not like this. However you say that lens correction is not applied but rather recorded

2. What do you think about idea about writing a utility, similar to yours, which actually applies some lens corrections to DNG rather than just discarding this information. I have not looked deeply at DNG format, but I think it should be possible. Maybe there is something like this already?

Thanks!

punainenkala
Dec. 29th, 2009 08:29 am (UTC)
Re: lens correction
Thanks for your interest.

Adobe DNG Converter will apply the correction if the source is converted into a linear DNG (which is not supported by Apple products and sort of loses most of a raw format's point anyway). This type of conversion is not done when using dngsanitize; the lens correction data will be just a few bits of metadata in the DNG file's header that gets snipped snipped off by dngsanitize.

Applying the geometric corrections to the raw data without dematrixing it first would be, at minimum, very, very difficult (and in my opinion, not possible). The raw matrix sensor data can't really be manipulated like a normal image because final colors are interpolated from several neighboring pixels; stretching and squeezing the data breaks the relationship that's assumed to exist between the (raw data) pixels.
notbrainsurgery
Jan. 2nd, 2010 03:52 am (UTC)
Re: lens correction
thank you for your explanation. Looks like I will need to wait for Aperture to support my camera :(
steve-hoge.myopenid.com
May. 13th, 2011 06:01 pm (UTC)
Building from source
The binary works great, but for my workflow I needed to remove the 'n' suffix added in dngsanitize.m from the converted .DNG files, so I tried rebuilding from source according to your great BUILD.TXT notes - and it almost worked!

I'm not sure which XMP SDK you were building against (rev 5.1.2 that I downloaded from Adobe is apparently the latest as of 5/2011) but what broke is a change in the API from SXMPUtils::AppendProperties() which is now deprecated to SXMPUtils::ApplyTemplate(). I updated dng_xmp_sdk.cpp to change this function:

void dng_xmp_sdk::AppendXMP (const dng_xmp_sdk *xmp)
{

if (xmp && xmp->HasMeta ())
{

NeedMeta ();

try
{

SXMPUtils::ApplyTemplate ( fPrivate->fMeta,
*xmp->fPrivate->fMeta,
kXMPTemplate_IncludeInternalProperties |
kXMPTemplate_ReplaceWithDeleteEmpty )

}

CATCH_XMP ("ApplyTemplate", true)

}

}


Thanks for the great tool!
- steve dot hoge at g mail dot com

( 4 comments )

Profile

flcl
punainenkala
punainenkala

Latest Month

February 2012
S M T W T F S
   1234
567891011
12131415161718
19202122232425
26272829   
Powered by LiveJournal.com
Designed by Tiffany Chow