Dec
26
2010

Hacking Nikon's "Picture Project"

Making Picture Project Work For Me (Part 2 or 3)

Sunday, December 26, 2010 - 01:14:17 pm
(Posted Under: Photography, PictureProject)
As a follow on to the last post, I've cooked up a solution to one of my annoyances with Picture Project. I need to store my photos that are in Picture Project on a network drive, and damn it, that is what I'll do.

As gripped in the previous post, PictureProject does not allow you to select a network drive for transferring photos to / importing photos from. However, this can be fudged once the photos have been to PictureProject (via either method), by modifying the PictureProject database.

The first thing required is for a samba share to be setup. Duh. If you're like me, and use 'Mark as hidden' in PictureProject to signify something (in my case, a photo that I've kept but isn't that good), the samba share needs to be setup to handle the DOS hidden attribute correctly. That's right, despite running off a database, PictureProject stores this information as a file attribute. A bizarre and not very consistent choice, though I admit, I take advantage of this implementation.

Thanks to a brain fart last night, I was regrettably thinking I needed to use a NTFS or FAT partition to make this work. Then I came to my senses, remembered that is all controlled by samba and that the underlying file system wasn't important, and joyfully reformatted as reiserfs. Hallejiah, because the last thing I actually wanted to do was use a Windows file system.

Getting the attribute to work right over Samba is just making sure the share is setup as such:

map hidden = yes
create mask = 741
Not setting the create mask with the 'all execute' bit active is what I was tripping up on. 'testparm' is your friend. Well, it was mine last night.

After moving all of the photos on to the share, hacking the database is next. PictureProject uses an Access database (oh, how novel, and "fun"). So fire up Access, and open C:\Documents and Settings\<user>\Application Data\Nikon\PictureProject\DataBaseSource.mdb . Well, after you back it up anyway. Some Google searching indicates that the password for this, and all the other files in that directory is 'nikon'.

From there it's simply a case of changing the data in the 'path' field to match the location of where the photos are now stored. Find and replace is your friend here.

By all accounts, everything is good once doing that, providing that the share is writable and is configured correctly to map the hidden file attribute. Photos on remote network shares can be modified just like they could be when they were on the local disk. Which makes you wonder why the developers of this software thought it was a good idea to disallow direct importing from networked drives.

Vola, now all my photos are stored on a network drive, as I want.

Of course, any new photos still need to be imported / transferred to a local disk initially, and the whole process repeated (move to network drive, update database) ad nauseum. But I guess that is life, and I should just be content with the ability to relocate photos to a network drive when I run out of space again.

If PictureProject backed onto a nicer database (*cough* mysql), or if I wanted to screw around enough with Access scripting, I could probably automate it all. But I'm not sure that that sounds like my idea of fun. For now I'll just wait until I have a whole bunch to move and do it manually.

Next on the agenda is to merge the PictureProject database from my old machine into the one I'm currently using on my laptop. But that's something for another day. Or maybe the twelfth of never. [wink]

Post Comment



All fields are required. Email addresses will not be published, but are required for anti-spam purposas.

Switch Styles

About Style Switching.

!Weblog Index

Nov December 2010 Jan
SU MO TU WE TH FR SA
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30

Categories

RSS FeedRSS Feed