Skip to main content
Participant
July 30, 2009
Answered

Read Photoshop document information outside of application

  • July 30, 2009
  • 1 reply
  • 1394 views

I've been banging my head against the wall over this for the last few hours, and I can't come up with a graceful solution on how best to handle it. I'm currently working on a .NET project, and it'd be really nice to have a way to read all the document information of a Photoshop file without having to actually open that document (for the processor's sake) in Photoshop. Hopefully, the document information would include size, profile, PS version, and color mode at least. Based off that information, I've got one of several hot folders that I would then send the file to.

I found a way to do this by using a StreamReader and searching for specific string matches (ex: "<photoshop:ColorMode>4</photoshop:ColorMode>"), but I found tag name variances in the different versions that made this a bit unreliable. Does anyone know of a better way to do this?

This topic has been closed for replies.
Correct answer xbytor2

If all of the information you want is in XMP, you and use and XMP SDK to get the information. Adobe has one. Other people have one.

Or, you can read up on the XMP spec to figure out how XMP is embedded in docs and read the XMP directly from the files and deal

with the XMP directly as XMP. This is not necessarily a fun thing to do since XMP is not always in canonical form so I recommend and SDK.

Your other alternative is to use exiftool at the API level. Then you have access to XMP and all the exif data you could ever want.

-X

1 reply

Paul Riggott
Inspiring
July 30, 2009
Participant
July 30, 2009

I had just found that thread about 10 minutes before you posted it.

It looks like it's using Bridge, though, and I'm trying my best to avoid using Photoshop, or any related programs to determine this. I may eventually move this project to a server, and unless I'm mistaken the newer versions of PS don't play well on servers.

I may just need to restructure my workflow to get this working correctly.

xbytor2Correct answer
Inspiring
July 30, 2009

If all of the information you want is in XMP, you and use and XMP SDK to get the information. Adobe has one. Other people have one.

Or, you can read up on the XMP spec to figure out how XMP is embedded in docs and read the XMP directly from the files and deal

with the XMP directly as XMP. This is not necessarily a fun thing to do since XMP is not always in canonical form so I recommend and SDK.

Your other alternative is to use exiftool at the API level. Then you have access to XMP and all the exif data you could ever want.

-X