Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Convert RAW Files in Your Aperture Database to Adobe DNG Files

The following describes how to convert all the RAW images in your Aperture database from manufacturer formats, such as Sony's ARW and Canon's CR2, to Adobe's DNG while retaining all the Adjustments already applied to your RAW files. In the example below I am assuming that your Aperture Library has ARW and CR2 files. These steps work with the latest version of Aperture, being Version 3.3, and have not been tested with earlier versions (in fact, it probably will not work because the database structure changed in 3.3 - however, this means that the steps below can also be applied to your iPhoto library). The steps are:



1. Within Finder select the Aperture Library and Secondary Click to bring up the Shortcut Menu. From this select "Show Package Contents"; this will open a Window showing all the files/directories contained within your Aperture Library.

2. Drag the "Masters" folder out of the Package and place it on your Desktop. The purpose of this step is so that Applications, such as Adobe DNG Converter, can "see" the "Masters" folder, which they cannot do if it is located within the Aperture Library Package.

3. Run the Adobe DNG Converter, select the above "Masters" folder with the "Select Folder" button, make sure you have selected the option "Save in the Same Location", it is also a good idea to select the option "Skip source image if the destination already exists", check your Preferences then select the "Convert" button.

4. Adobe DNG Converter will now convert all the RAW files to Adobe DNG files and save them in the same location as your existing RAW files. Once complete, take a note of (a) the number of files converted and (b) the types of files converted, such as if the conversion includes ARW, CR2, NEF files etc. In this example I will assume that the converter only found ARW and CR2 files; if your system is different then modify the steps below to make sure it covers all the RAW file types converted in your particular system.

5. Select the "Masters" folder and in the Finder Window Search Field search for all the files that end in .ARW and .CR2 (this filename search list should match the types of files found by the Adobe DNG Converter in step (4)(b) above). The number of files returned by the search must match the number of files recorded by the Adobe DNG Converter in step (4)(a) above. Do NOT put the .DNG files in your search criteria. Select all the files found in the search and move them to the Trash. This will delete all the original manufacturer's RAW files from your Aperture Library leaving behind all the new DNG files.

6. Move the "Masters" folder on your Desktop back to the root directory of the Aperture Library Package Content directory.

7. Select the Finder Window containing the Aperture Library Package Contents.

8. If there is a file called "ApertureData.xml" then open it with a text editor. Search and Replace ".arw" with ".dng", ".ARW" with ".DNG", ".cr2" with ".dng" and ".CR2" with ".DNG" (note, do not use the " marks in your search). Make sure you cover all the file types incorporated in your particular system. Save the "ApertureData.xml" file.

9. Traverse to the Database/apdb directory. Select the "BigBlobs.apdb" file and open it with a Hex editor. In this example I will use Hex Fiend by Ridiculous Fish (see http://ridiculousfish.com/hexfiend/). Once the file is open perform a Find and Replace ensuring you are finding and replacing Text and not Hex. In Hex Fiend this means selecting Edit/Find from the menu and then selecting the "Text" button to the top/left of the window. In your Find/Replace field you will need to find ".arw" and replace it with ".dng", make sure you select "Replace All" (note, do not use the " marks in your search). Do exactly the same for ".ARW" with ".DNG", ".cr2" with ".dng" and ".CR2" with ".DNG" (and whatever particular RAW files were in your system).

10. Perform exactly the same steps in (9) for the files "History.apdb", "ImageProxies.apdb", "Library.apdb" and "Properties.apdb".



That is it, your Aperture Library now contains DNG files instead of your original manufacturer files while still retaining all the Adjustments originally made in Aperture to those manufacturer files. Of course, you can repeat the same step and replace your DNG files with the original RAW manufacturer files if you wish. This process works because:



1. Aperture does not store the Adjustments in the RAW files, it keeps these in its internal SQLite database.

2. By using a Hex Editor you (a) don't have to play with SQLite to gain access to Aperture's data and (b) because you are replacing text that has exactly the same number of characters you are not invalidating the format of the underlying data file - this is why you use a Hex Editor instead of a simple text editor.



Think of Aperture as being a repository that holds Adjustments which then link to the original RAW source. Therefore, the above process simply replaces your RAW source and therefore all the Aperture Adjustments are still valid; same Adjustments, new source. In case you ask, no, you cannot transfer Adjustments in and out of Aperture because there is no standard to transform adjustments between different photographic applications.

Posted on Jun 17, 2012 8:03 PM

Reply
8 replies

Apr 23, 2013 11:39 AM in response to David Cittadini

I am very confused by steps 8 and 9. A little over my head possibly. Im also nervous about step 5 in deleting the original manufacturing files. Is there any potential problem with this step. Finally, I am looking to only do this with a select number of images from my overall library. Can I do this or do I need to convert the entire library to the DNG format?

Apr 23, 2013 12:17 PM in response to David Cittadini

A rather involved method, David.


I am sure it works, and compliments for figuring it out, but I think one critical step is missing in your workflow: Before you begin - backup, backup, backup! 😉


And I think, all the edits in your database that you are doing so diligently, is what you bought Aperture for to do for you, why do it yourself?


I convert selected raw files this way - without manually patching the Aperture Library:

  • Export the originals of the raw images that I want to convert.
  • Run dng-converter.
  • Import the converted originals back, flag them, and move them to the project they came from.
  • Sort the project by capture date, so that identical images are show side by side.
  • Then I use the Lift&Stamp tool to transfer all adjustments and tags from the original raw to the dng copy. I check, if some edits are left to do, then delete the original.

It may take a little longer than your method, but this way all edits in the library are done by Aperture, and I am protected from accidental slips when editing the property list files. That requires a very careful work.


Patching the database files inside the library may be justified as a last ressort, when you need to fix and recue a broken Aperture library, and none of the provided tools is working, but not as a routine operation to do batch conversion of image files. It is very error prone. One wrong entry in the library files and your Aperture Library may be unreadable.


Regards

Léonie

Apr 23, 2013 12:58 PM in response to léonie

This is far more convenient and I have successfully exported, converted, imported and used the lift and stamp tool to edit the new dng files. However, I still have the problem of exporting a dng file. I am trying to submit work for publication and their submission guidlines require photos to be in a dng format. So how can edit a photo in aperture and export that edited version as a dng file? Or is this impossible?


Cam

Apr 23, 2013 1:18 PM in response to camscot

To export edited versions use "File > Export > Version" and pick a format.

But you cannot export the edited image as dng - even if the original raw file is in dng format. Aperture reserves the raw formats for unedited originals. Also dng-converter will only convert unedited camera raw to dng.


The only way to export in a raw format - camera raw or dng, would be to export the original and not the version.


I am trying to submit work for publication and their submission guidlines require photos to be in a dng format.

Are you sure, they will accept edited images? This looks like they want unedited raw images.


Or do they want "png" and not "dng"?

Apr 23, 2013 1:23 PM in response to léonie

Positive. This is what the guidlines state in regards to dng


DNG is an open standard for raw files that increases accessibility and the ability to process camera raw files. It also alleviates future use concerns since it is based on open standards. After raw files have been converted to DNG, the files remain “raw” and maintain the same color manipulation options and image information as the original raw file. These DNG files are viewable in Lightroom, Photoshop (CS or higher), iView, and most other image management applications. This allows users without Photoshop to view these files, and eliminates the need to save them down to TIF or JPG.

DNG files are a hybrid file containing both the raw image + metadata + ACR exposure settings, output by ACR and the Adobe DNG file converter. DNG files are essentially the RAW (.cr2 or .nef) image + the .xmp sidecar file, all in one file. The advantages the .DNG are twofold. First, you don't have to worry about accidentally losing the xmp file and loosing all metadata. Everything you need is contained in one file, and opens up in ACR like any other RAW image. Second, it is a non-proprietary file format. What that means is 3 years down the road, when Adobe or Nikon abandon the current raw file format, there will still be support for it with the current software. It is truly as close to a digital version of a negative as possible at the time.

Apr 23, 2013 1:40 PM in response to camscot

It is truly as close to a digital version of a negative as possible at the time.

Yes, that describes the dng it nicely - digital negative. It is a format that supports to store the original, unedited image.

You could try to export your edited image versions as tiff - sometimes dng converters treat tiff as raw, but I had no luck, when I tried adobe dng converter on the tiffs exported from Aperture - I always got a parsing error. If you want to try it, change the extension from tiff to tif. Otherwise dng converter will not open the file.

Convert RAW Files in Your Aperture Database to Adobe DNG Files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.