Recover

Aperture: Recover Images With File Juicer

filejuicericon
File Juicer is a small Mac OS X application that extracts images, movies, text, and other useful data from practically anything. It's useful to Aperture users in two important ways: it can recover usable images from the library if the masters are lost and and can scrounge deleted images from memory cards.

One of the hazards of working with referenced image masters is that their management is the responsibility of the owner. Accidental deletions are not that uncommon, and if that happens then while Aperture can display the images, it cannot export or otherwise use any of the versions that are based on the lost masters. If the masters are truly lost -- no back ups, nothing in the trash -- then whatever images can be found become valuable.

If high resolution previews were generated, then these can be extracted from the Aperture library by simply selecting the thumbnail images in the browser and dragging them to the desktop. They will be in JPEG format and at a size and resolution that depends on the settings in Aperture's preferences:
filejuicer7
If there are no previews, then attention turns to the thumbnail files that Aperture stores in each project. It is these images that are used to display the on-screen thumbnails in the browser pane and as placeholder images in the viewer while Aperture processes the RAW image. The files that contain the thumbnails are called AP.Tinies, AP.Minis, and AP.Thumbnails and contain images at 32, 256, and 1024 pixel sizes respectively. They are also present in exported projects, but not in vaults.

To get to the thumbnails, I control-click on the library and select Show Package Contents. Then I navigate down to the project of interest and open that with a control-click and Show Package Contents:
filejuicer1
The AP.Thumbnails file is one big chunk of binary data, but inside there are complete JPEG images. File Juicer will go into it and locate and extract the JPEGs without knowing the format of the file.

I launch File Juicer and check that the preferences are set to include JPEG images (at least):
filejuicer2
I also make sure that the extracted files will be stored somewhere sensible, such as on the desktop, because I don't want the extracted images put inside my Aperture library:
filejuicer3
With the selections I have made, File Juicer will put each image type into a separate folder and create a parent folder for those. It will also get an HTML index file for easy browsing. To start scanning for images, I drop the AP.Thumbnails file from my project onto the main File Juicer window and wait for it to process:
filejuicer4
After processing I get a new folder on my desktop containing the images:
filejuicer5
And I can either open the jpg folder and browse the image icons in the Finder (or watch a slide show), or click on the index.html icon and see all the images in a browser window as a panoramic display:
filejuicer6
Now my images have been extracted, I can reimport them into Aperture and sort through them. They will be smaller then the originals -- only up to 1024 pixels on a side-- and there will be one image per version. So a single lost master will result in five recovered JPEGs if it had five versions in that project. This is good because I get my adjusted images, albeit at low resolution.

Since File Juicer is scavenging for JPEGs rather than following any information that Aperture provides, there are some side-effects. The first is that there may be old images or possibly corrupted images in the folder of JPEGs. The second is that the names of the images are sequential and bear no relationship to the order in which they were taken or anything else. The third is that there is no EXIF or other metadata in the JPEGs, so all the keywords, camera and shooting data are lost.

File Juicer will also recover RAW and other images that have been deleted from camera cards, so if masters have been lost it is possible that they can be obtained that way. The process is very similar to the thumbnail recovery described here, except that there is an extra step at the beginning where File Juicer creates a disk image of the card and scans that.

The File Juicer web site has a page dedicated to its use with Aperture, and one about RAW image formats.
|

Aperture: How Do I Restore A Single Image From A Vault?

qandasmall
Great blog-- thanks!! I seem to have "misplaced" a master image. Not quite sure what happened. I opened it (twice) with an external editor and attempted to delete one version (using the 'Delete Version' option). I did not choose 'Delete Master and all Versions' option and Aperture never asked me to confirm this action. However, all traces of the photo now appear to be gone from the library. I drilled through using the 'Show page contents' tool and looked at previews. There is no folder in the project for this image. I have recently backed up my Vaults before editing. Is there any way I can recover a single master image from a vault? Thanks in advance for any suggestions!!

Yes, single images can be retrieved from vaults. By navigating down into the vault or by searching, the image can be located and copied out using the Finder. Once copied, it can be imported back into Aperture. This will lose all versions and adjustments, and any metadata that is not part of the original master file.

But first, check for the image in the trash. Images in Aperture that are deleted are put into the trash in a folder called Aperture. Inside that is another folder with the name of the project the image was in. Inside that is the images deleted from that project.

I'll find and restore a deleted image from a vault. The organization of a vault is very similar to that of the library, so delving into the vault is very similar to delving into the library. Since in this case I know that the name of the deleted image included the number 2486, I can search on that. First I open the vault using control-click and Show Package Contents:
vaultfile2
Then by typing the part of the name I know into the Finder's search box, I can quickly locate the image:
vaultfile3
I can use the slideshow and other features of the Finder window to examine my image. Once located, I option-drag the image out of the Finder window to copy it to the desktop, then drag it onto a project in Aperture to import it again.

If I had not already known part of the name of the image, then I would have had to do more work. By typing JPG into the search box (since I know that my master image was a JPG) I can find all the images and then browse through them:
vaultfile4
This will of course work for other file name extensions such as CR2 or NEF. Selecting a image in the Finder window shows the full path at the bottom and double-clicking a folder in that list will open the folder for further examination. Control-click can be used to open projects that show up the path by selecting Show Package Contents. As before I can option-drag image masters out to copy them and restore them to Aperture.

If the deleted image is not in the trash and also not in the vault, there is one last place it may be. Images deleted from vaults by a vault update are not removed entirely, but they are not put into the trash. Instead the folder that holds the vault contains a folder with Deleted Images in its name. Inside that is a folder named for the date and time of the vault sync that removed the image from the vault. Inside that are folders for the deleted images and the masters:
vaultfile
My image is now available for reimporting into Aperture. The techniques I show here can also be used to find out if the image really was deleted from the Library in the first place.
|

Aperture 1.5: Recover From Broken References to Edited Files

If referenced masters are edited outside of Aperture without performing Open In External Editor and then the reference is broken, it may not be possible for Aperture to reconnect to the master, even by using the Referenced File Manager.

The reason for this is that to ensure the master being reconnected is the same image as the original, Aperture checks the file size. If editing changes the file size then the Reconnect button on the Referenced File manager will not be enabled.

Of course doing anything to masters behind Aperture's back like this is Bad News and is asking for trouble. To modify an image, whether referenced or managed, always use Open In External Editor, edit the image, save it (it goes into the library as a managed master), and then relocate the new master out of the library.

There are two ways out of this situation. The easy way is to delete the image with the broken reference (don't delete the referenced master!) and then reimport the master. This also loses all the adjustments and metadata, so may not be a suitable solution. The hard way, which I describe below, patches Aperture's library so that the file size information is correct and Aperture will reconnect the broken reference. This method does keep all the metadata and adjustments intact.

To allow Aperture to reconnect the master you have to correct the file size information that is in Aperture's database. To do that you have to get the correct file size, find and edit the image's apfile buried in the library, and then rebuild the database.

Find The Image apfile

Each master has an apfile, an XML file that describes the master. To find the apfile, inspect the image in Aperture and note its project, its location in the blue folder hierarchy, its import group, and its master file name. My example image is in the Tree Cutting project:
recon1
The inspector pane (I) shows the file name and the location of the master if it has been set up to do this:
recon2
Quit Aperture and navigate to your Aperture library in the Finder. Open the library using control-click Show Package Contents and navigate down into the library, through the blue folder hierarchy, and to the project folder:
recon3
Control click the project and Show Package Contents, then navigate to the image folder inside the project via the import group folder.
recon5
There it is: Pine tree chopping24.JPG.apfile

Find the correct file size for the image master

Open the Terminal application and type "ls -l " (that is lower case L, lowercase S, space, hyphen, lowercase L, space). Locate the image file in the finder and drag the image file icon onto the terminal window and let go:
recon6
Press Return and note the number displayed before the date. That is the correct file size in bytes:
recon7
In this case the number is 2128603. The Finder will show a larger file size because it includes space used by the resource fork:
recon8

Correct the file size in the apfile

Open the apfile using a text editor or XML editor (drag and drop the file onto the application icon of a text editor like TextWrangler in the dock). Locate the item fileSize and replace the size with the size you determined using the terminal above.
recon9
Close and save the apfile.

Repeat this for each of the images you need to recover and then close the library and project packages.

Rebuild the Aperture database

Locate the Aperture application icon and option-command double-click. Choose to rebuild the database and wait for it to complete.

Once done, the images that had their sizes fixed should be reconnectable.
|

Aperture: Recovering From Importing Images With No Extension

I have diagnosed the cause of the problem I discovered yesterday. It has nothing to do with write-only files (although those will cause other problems and that is a bug that should be fixed): it is the fact that the image files have no extension. I got into this mess by importing the images by reference and leaving them were they were and then consolidating them and selecting the Move option.

To recover:

1. Open the Aperture library package with control click and select Show Package Contents

2. Find the affected project, open that package, and drill down to the individual image folders

3. Open the folder for an affected image and look for the file ending in .apfile. Open that with an XML editor or a text editor. Here is one:
bug1
Notice that the extension field is blank. And the imagepath and name fields have the file name without an extension.

4. Change those to the filename with the correct extension.

5. Change the item called extension from blank to JPG or whatever the extension should be. I used upper case because that is what Aperture uses.

6. Save and close

Here is my example fixed:
bug2
7. Rename the original file in the image folder by adding the correct extension (.jpg in my case)

8. Repeat for all affected images

9. Find the Aperture application icon and command option double click. Aperture will launch and ask you if you want to rebuild the library. Click Now and it will do its work. Not rebuilding the library will not do any harm, but if you don't rebuild it then the database is out of sync with the apfiles and the broken images will still be broken.

This seems to fix the problem for me, but I have simply replaced my library and files with back up copies now.
|

Aperture: How Do I Delete Referenced Masters?

qandasmall
Hi, my whole Aperture Library is based on referenced files. I already had a document structure in my Pictures folder before I started using Aperture. Now I dragged these folders right onto my Library icon inside Aperture (as you suggest in one of your tips). However there's one thing I really, really miss: How can I completely delete pictures? When I do photoshotings I use to filter my photos, look for the best results and then delete the bad ones. Appearently this doesn't work. I get a notification and then the file is deleted from my Aperture Library. However it's still on my harddrive. Is there a way to delete a picture in both the Aperture Library _and_ on my harddisk?

There is a misunderstanding here that is causing some confusion. By dragging your photo folders into Aperture you created a project inside the library and also caused Aperture to copy those images into its library: your images are actually managed, not referenced. The dialog you saw:
del1
Shows this to be the case. If you were attempting to delete any referenced images, then you would have seen this dialog:
del2
which includes an option to trash the masters that are outside the library.

In order to import your images as referenced masters you will have to use the File > Import > Images or File > Import > Images Into a Project items from the menu. Once you do that to bring up the dialog makes sure that the Store Files: option is set appropriately, in your case to In their current location:
del3


But your question raises an interesting problem. What if I were to delete my library images but not move the referenced files to the trash? Where does that leave me? It leaves me with a problem. I now have masters on a disk somewhere that are not connected to the library in any way. So if I want to delete them or use them somehow later I am out of luck. I have no way to find or isolate them to delete them. I will call these orphaned masters.

How To Recover Orphaned Masters


Here is a folder on my disk that contains referenced files. There are sixteen of them:
del4
I imported all sixteen by reference so that the masters were left in this folder and the Aperture library just contained pointers to them. Then I deleted three images, but did so without letting Aperture move the masters to the trash, so in this folder are three orphaned masters. But which three?

Here is how to find out. First in Aperture I select everything that could be in the folder (project, album, import session, or whatever does it) and then relocate those to some temporary location, choosing to move the masters, not copy:
del5
Now look at what is left in the original folder:
del6
Just the three that Aperture did not know about: the three I had deleted. So now I can delete them for real or move them or do whatever else I want. Once that is complete I can use relocate again to restore my masters to their original position if that is what I want.
|
The Bagelturf site welcomes Donations of any size