Adding metadata to images
Adding metadata to images
- Subject: Adding metadata to images
- From: Shamyl Zakariya <email@hidden>
- Date: Thu, 5 Jul 2007 09:31:18 -0400
I'm writing an app which batch processes bumpmaps to normalmaps when
the user drops files ( or folders ) onto the app's batch window.
Now, I want to filter existing normalmaps from the files dropped.
Consider the situation where a user drops a folder full of bumpmaps
on the app, and generates normalmaps from the bumpmaps. Then later
the user decides to use different settings and drops the folder back
in to the app. I need to filter out the normalmaps that were
generated before.
I've already written some simple image analysis code which seems to
do a pretty good job filtering out normalmaps, but it occurs to me
that if my app were to somehow tag the images it saves as being
normalmaps I could easily use MDItem to extract that info and discard
the normalmap without having to perform a ( relatively ) expensive
image analysis.
I know there's no generic way to add metadata to files, but since my
app generates *images*, and since there does seem to be a standard
set of metadata for images, I feel like I ought to be able to tag the
images with a "generated by org.zakariya.normalmappr" or some other
kind of tag. I could then filter out any file with that tag without
having to run image analysis.
So, is there any way to add a tag to an image file?
For context, my app writes the file by using NSBitmapImageRep's
representationUsingType: properties: method which gives me NSData.
I'm willing to use a different image writing approach if I can embed
generator metadata.
email@hidden
"negative, i am a meat popsicle."
-- Major Korben Dallas
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden