Photoshop Elements 5.0

WALoeIII

Joined: 2004-08-14
Posts: 18
Posted: Wed, 2007-01-17 18:44

I did some searching, but was unable to find any information on exporting from Photoshop Elements 5.0 to my Gallery 2 installation. On my Mac I use iPhoto and the Gallery plug-in. Does anything like this exist for Windows? I know I can use the Gallery Remote and just drag things, but that is not too efficient when I want to share hundreds of photos.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2007-01-18 01:31

Gallery Remote, Windows XP Publish, WebDAV.

--------------
Enter the Gallery 2 Theme Contest today!

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Sun, 2007-01-21 21:20

WALoeIII,

I'm with you - I've done some research and cant find any way to automatically export Photoshop Elements 5.0 (Or any other version) to Gallery 2. There is a script to export to Gallery 1 (It was written for an older version of elements). I dont really like how this works though anyway - you have to select a specific album (I think collection in elements) to export, and a specific album to create in gallery1.

I'm toying with the idea writing a script to do this (export from Elements 5.0 -> Gallery 2), but with the constraints on my time these days, I cant see this happening soon. (I currently using bunch of scripts I wrote myself to allow people to search my photos online, but the output doesnt look nearly as good as gallery 2).

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Mon, 2007-01-22 03:14

Are you also talking about transfering over IPTC data? Does Picasa already do this?

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Mon, 2007-01-22 04:18

The IPTC data? Are you refering to the caption and "tags" associated with the picture? If so, then yes.

I dont know about Picasa - I dont use it.

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Tue, 2007-01-23 12:56

fweee,
Does Photoshop Elements 5.0 transfer over the caption and keywords or just the caption and title? Can you be more specific? I am looking into using this so I can archive and organize my photos offline since it's faster and easier than doing it all manually on Gallery. What exactly can I transfer over to Gallery2? Thanks!

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Tue, 2007-01-23 12:58

Oops, Okay I re-read your original posts and I see that you guys need this, as well. Okay, lets hope someone makes a script for this!

 
WALoeIII

Joined: 2004-08-14
Posts: 18
Posted: Thu, 2007-01-25 18:35

What kind of script would this be? I am generally a mac user, and could script this with Applescript pretty easily. For windows would it just be a .bat?

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Thu, 2007-01-25 23:39

WALoeIII,

I'd say it would be a perl script (for windows). A batch file (.bat) wouldnt be powerful enough to do this I dont think.

 
tupdegrove

Joined: 2007-01-08
Posts: 32
Posted: Fri, 2007-01-26 19:01

I use PSE3 now and would love this feature. If the solution was PSE5 only, I'd upgrade to use this feature. I'd want to upload the IPTC data (mainly, caption).

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Sun, 2007-01-28 01:11

Well, I've started doing some development - it could take some time, as I have to squeeze it in between the rest of my life, and I'm not an expert with perl.

One thing to note - I'm planning on going beyond a simple uploading of an album (or collection). I'm planning automatically uploading every photo to an "All" album, then creating a whole bunch of other albums (for the "Collections"), and using the link functionality to link the pictures to where they should be. This means if a given photo is in several "collections", there will only be one copy of it on the server.

Unfortunately, the Gallery 2 API does not include linking, so I'm going to have to do this myself by directly updating the database. This is all well and good for me, as my web server is on my network, but if your web server is remote (not on your lan), then you will have trouble getting this script working (if I ever finish it).

 
enigma_edi

Joined: 2004-04-28
Posts: 7
Posted: Tue, 2007-02-06 11:58

Hey fweeee,

Fantastic that you're looking into this - can I suggest that you focus on the basic functionality (i.e. single image upload, or group image upload) first and then work on the collections bit.

I'm not sure where the user interface would be for this functionality, can you add a plug-in into Elements, or tap into the functionality within elements to upload to an online service?

Just my 2 cents.

Cheers,

Enigma_edi

PS - search for my past posts to pick up some previous threads on this very topic.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-02-06 12:21

> Unfortunately, the Gallery 2 API does not include linking

what kind of linking?
see modules/replica/ItemCreateReplicaSingle.inc function handleRequest(). (only G2.2)

true, there's no GalleryCoreApi function to do it, but you can copy and adapt the function.

--------------
Enter the Gallery 2 Theme Contest today!

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Fri, 2007-02-09 07:01
Quote:
what kind of linking?
see modules/replica/ItemCreateReplicaSingle.inc function handleRequest(). (only G2.2)

true, there's no GalleryCoreApi function to do it, but you can copy and adapt the function.

I'm talking about the linking function you get when looking at an image - you get the option of linking to another album within your gallery.

Well, I toyed with the idea of making a link API, but I'd have no idea where to start. I do know how to manipulate an SQL database with perl, so that is the approach I'm taking at the moment.

Just how hard would it be to make a link API? How long would it take? The linking bit is all thats holding this script up at this stage.

Quote:
Fantastic that you're looking into this - can I suggest that you focus on the basic functionality (i.e. single image upload, or group image upload) first and then work on the collections bit.

Thanks for the tip - but not to seem selfish, I'm going to concentrate on what is useful to me for now. Uploading a single image would be worse then my current solution - its either all of nothing for me. (my script can currently upload every image in elements 5 into a single album in gallery2, along with captions).

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2007-02-09 09:23

> Just how hard would it be to make a link API? How long would it take? The linking bit is all thats holding this script up at this stage.

you just need to copy 50 lines of code from modules/replica/ItemCreateReplicaSingle.inc into a ReplicaHelper.class (or anoher php file) and make it a function.

--------------
Enter the Gallery 2 Theme Contest today!

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Sat, 2007-02-10 03:21
Quote:
you just need to copy 50 lines of code from modules/replica/ItemCreateReplicaSingle.inc into a ReplicaHelper.class (or anoher php file) and make it a function.

Oh - is it that easy? That sounds like much less work then my original plan (updating the SQL table manually using perl). I just wish I had found this out before spending the time analysing the tables/records added during a link...

I'll give it a go sometime in the next few days. I might have to ask for help if I get stuck. I guess I'll have to get V2.2 first, right?

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Sat, 2007-02-10 07:29

OK - I'm having a bit of difficulty. I've only worked with php once, and that was over a year ago, and it was a simple "display data/photos from a database" kind of project.

I can see in modules/replica/ItemCreateReplicaSingle.inc that there are 2 classes - ItemCreateReplicaSingleController and ItemCreateReplicaSingleView. Which code in this is the stuff I'm interested in? And where does this ReplicaHelper.class file go? In the remote module? (modules/remote/classes).

Thanks.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2007-02-10 09:15

- ItemCreateReplicaSingleController function handleRequest has the code to verify the inputs and to create a link-item based on the input data.
- put your API function whereever you want it. we usually put helper / API classes in modules/*/classes/ . modules/replica/classes/ would be appropriate.

--------------
Enter the Gallery 2 Theme Contest today!

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Sat, 2007-02-10 22:23

ok valient,

I have copied modules/replica/ItemCreateReplicaSingle.inc to modules/replica/classes/ReplicaHelper.class.

From what you have told me before, I need to keep the ItemCreateReplicaSingleController class - does this mean I can scrap the ItemCreateReplicaSingleView class?

And with the ItemCreateReplicaSingleController class, do I rename this to ReplicaHelper (I'm looking at another replica class file looking for hints).

Thanks.

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Thu, 2007-02-15 23:08

Well, I'm having a lot of trouble with this Helper/API for Replica - if anyone can give me some assistance, it would be much appreciated.

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Sun, 2007-02-18 05:59

Well, I've finished the first version of the script. Due to the fact that no API exists for linking/replicating (and I could not work out how to do it myself), the end result isnt quite what I was after. Hopfully I'll improve it somewhat in the future. You can find it at:
http://sourceforge.net/projects/pse2gallery2

A quick overview:
You will need to set up the Photoshop Elements 5.0 database an ODBC source in windows.

When the script is run, you give it 2 parameters - the ODBC source name, and the address of the website you are uploading to (http://urlgoeshere.com/gallery2). You will be prompted for a username/password.

The script will, for each photo in your elements database, do the following:
1) Upload it to a <username>_all album (If you log in as admin, it will upload it to admin_all)
2) Find the collections this photo belongs to, and create the collection as an album in gallery2 (if it does not already exist), along with all its parent galleries (so the structure of collections in Photoshop Elements is maintained). It will then upload the photo to each collection it belongs to.

This was not my original intent - I wanted step 2 to involve linking (or replicating), so that each photo is only uploaded once. But this is not to be for now.

Captions are maintained, but tag information is not for now. I am toying with the idea of creating custom fields (in gallery2) for these, so you can search for names/places in the tags. But I had trouble uploading to custom fields via API, so that remains on the backburner for now.

Images that are marked as "Hidden" in Elements are not uploaded.

Right now the script is not as full featured as most people would like - you cant upload a specific collection, or image, although this is all possible I guess.

If I (or someone else) manages to get a link/replica API working, I will definitely add that to the script.

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Sun, 2007-02-18 11:32

An update will be coming in the next day or two - this will allow you to select a specific collection to upload, or to only upload photos with a certain "star" rating.

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Sun, 2007-02-18 15:19

Wow! Ill check it out a bit later today. Thanks so much for working on this and we really appreciate it!

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Sun, 2007-02-18 20:21

No problem.

I'm thinking I'll add another feature. I'm using the <user>_all gallery as the "master" album. Originally I was only going to upload to this, and then link to the various albums it belongs to. After realising I could not do this, I started uploading the photo to the other albums instead (effectively duplicating the photo). Very inefficient, but convenient for tracking what photos have been uploaded before (it checks the <user>_all album to see if the photo has already been uploaded). Also, I'm hoping a linking/replica API will be made by someone soon (Or I will get some more pointers in making it), so I'm keeping the structure as is. But what I might do, is give the option so that the photo uploaded to <user>_all is reduced (using ImageMagick) before it is uploaded. This will reduce the upload time, and the HDD space required.

Also, if you like the script, please vote for feature 1662981 (at http://gallery.menalto.com/sfvote/vote). This is my request for linking/replica functionality via API.

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Mon, 2007-02-19 11:29

I've just put version 1.1 - this allows you to upload a specific collection, allows you to only upload those with a certain star rating, and removes a bug that limited the length of captions you could upload.

There is a bug with orientation however - Photoshop Elements automatically corrects the orientation of photos (so long as the camera taking the photo put in the orientation data), but the current version of gallery2 does not. I think I read somewhere that the next version does, so I think I'll just hang tight for now on this one.

 
gowdy

Joined: 2005-10-27
Posts: 18
Posted: Tue, 2007-05-22 09:22

Hi All,

I did this a little different. I upload my files via the "local server" option (and use symlinks to avoid copying the files). I then dump the database contents of PSE4 (just about to try version 5) to a sql script to load the tags into Keywords. I then use mysql to update the keywords in the gallery2 database. Now I can have Keyword albums for all my tags.

This ugliest bit of this is that I need to have a table in the PSE4 extraction script to translate the disk path to the album path in gallery2 as I have images that have the same filename (the NNNN in img_NNNN.??? has wrapped around). This seemed like the easiest way of doing it rather than trying to make even more complicated SQL.

Stephen J. Gowdy

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Tue, 2007-05-29 22:12

gowdy,

An interesting approach, and one that allows you to keep all of your Elements tags in Gallery2 (If you are anything like me, you have spent days time maintaining those damned tags, and have next to zero captions). Is this an approach that can work remotely? Or only for a local server?

My previous Elements/web approach allowed me to keep extensive tag information on the website. I wrote it from scratch, using perl/php, so users users could use a lot of the "Elements" functionality from a web front end (using tags to search for photos of certain people, at certain events, at certain dates). There was just a few problems with it:
1) It wasnt very pretty (I'm a developer/programmer, not a graphic designer)
2) It wouldnt work for remote websites (only servers on the same LAN).
3) Nobody used all of the cool functionality I had created. I found that when people came to my site to look at photos, they just wanted to look at photos from a specific event (say, a wedding), they didnt want to search for photos using tags (search for themselves, in a church, at a wedding).

This is why I decided to switch to Gallery2 (although my previous solution is still running). The people I show my photos to dont give a damn about tags, just so long as it is easy to find the photos they want to see (The API doesnt offer any easy way to upload tags anywhere).

The script I talk about above (pse2gallery2) is kind of dead. It stopped working for me when I upgraded to vista, and I couldnt be bothered getting it going again. Instead I'm in the process of writing an Elements->Gallery2 upload thingy with a GUI.

 
gowdy

Joined: 2005-10-27
Posts: 18
Posted: Tue, 2007-05-29 23:41

It probably wouldn't work remotely trivially as it assumes the photos are already uploaded and it modified the mysql database directly.

It does keep all my Photoshop Elements tags though, which is what I wanted. You can use Keyword albums to make all the keywords available with a single click for users. I think people have been using this (to get all the pictures of my new daughter for instance), but can't be sure (I've not been looking in my logs).

As you, I do have tons and tons of tags on more than 20k pictures, and very few captions (the odd one like, camera was 1 hour off from this picture till xxx).

I think this works for me but probably not for everyone in general. The script that does the extraction and creates the SQL from Photoshop Elements is probably based on the same one you have (album2gallery.pl IIRC).

One things that I've not decided if it worth fixing is that I have tags that are in different categories but with the same name. The keyword stored is just the last part so it can cause overlaps (like I have Places/Homes/Palo Alto and Places/Trips/Palo Alto). I could either have the script add some of the path-bit to the keyword or fix the names so they are unique in Photoshop Elements.

I've got PSE5 on the way, I hope there are no changes to the database to break my script... (currently using PSE4).

Stephen.

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Thu, 2007-05-31 10:38

That Keyword album idea sounds interesting. I've just spent 10 minutes or so trying to work it out, but havnt found any mention of it within gallery2 (although I have found where the keywords go). Can you tell me where to look? I'm not sure if I can upload to the keywords field via the API though (I've tried previously and not got anywhere).

 
gowdy

Joined: 2005-10-27
Posts: 18
Posted: Thu, 2007-05-31 12:01

You need to turn them on in the "plugins" area of Site Admin then add the block to the albums page (via the theme), making sure you configure to show all keywords there. You can see an example where I've added two keywords to one image on my public Gallery2 instance;

http://www.gowdy.us/g2p/

(there is only one album visiable by default but it has the image with the keywords).

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Thu, 2007-05-31 20:59

Hmmmm. Still cant work it out...

In site admin I cant see any "plugins". The closest to it is "Modules".

I think I'm using a recent version of gallery2 - I installed it last night on my test machine, using the ubuntu package manager.

 
gowdy

Joined: 2005-10-27
Posts: 18
Posted: Thu, 2007-05-31 21:09

I'm running 2.2.1, which version do you have?

Gallery version = 2.2.1 core 1.2.0.1

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Fri, 2007-06-01 03:43

I'm not sure - how do I tell?

I'll try downloading from the gallery website and see if that is different tomorrow. My live environment was installed from fantistico, and my test environment was installed using ubuntu's package manager.

 
gowdy

Joined: 2005-10-27
Posts: 18
Posted: Fri, 2007-06-01 08:38

If you go to the "Site Admin" then "Maintenance" on the left then run the option "System information".

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Fri, 2007-06-01 21:22

Ah ha - got it. Both of the galleries I was using are 2.1.2 core 1.1.0.2.

I've now installed a brand new instance, and can see the keyword functionality you are talking about. This seems like a perfect way to use the tags in Elements in Gallery.

Unfortunatly, I cant see anyway to upload keywords to gallery via API. I've tried using the extrafield.fieldname option of the add-item as laid out here http://gallery.menalto.com/node/32113 , but this seems to be for G1, and I cant work it out for G2. I might post another question to see how to do it for G2.

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Fri, 2007-06-08 22:25

You might be interested to know that I have written an add-on for Pix2Gallery2 to upload from Adobe Photoshop Elements 5 to Gallery 2.

The functionality is a little limited. It only uploads captions - no tag/keyword functionality at the moment, so it wont do what you (Well, gowdy) wants at the moment.

But I have put in feature request to allow me to assign keywords via API, so hopfully that will get some votes, and get implemented.