coldfusion - How to inject metadata info to image file upload? -
coldfusion - How to inject metadata info to image file upload? -
dear coldfusion baddies,
i know if there way add together metadata info when i'm upload image through cf!
e.g. can through photoshop http://www.artsnova.com/x/chicago-artists-coalition-email-metadata.jpg "photoshop metadata"
i suppose can convert image base64, inject info there , write file:
<cfimage action="write" source="#imagereadbase64(form.mybase64image)#" destination="#filepath##filename#">
i have noticed there in jpg file next tags:
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="adobe xmp core 5.3-c011 66.145661, 2012/02/06-14:56:27 "> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:aux="http://ns.adobe.com/exif/1.0/aux/" xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" xmlns:xmpmm="http://ns.adobe.com/xap/1.0/mm/" xmlns:stevt="http://ns.adobe.com/xap/1.0/stype/resourceevent#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmprights="http://ns.adobe.com/xap/1.0/rights/" xmp:rating="0" xmp:creatortool="adobe photoshop cs6 (windows)" xmp:modifydate="2014-06-20t11:59:38+02:00" xmp:createdate="2014-06-03t07:52:21" xmp:metadatadate="2014-06-20t11:59:38+02:00" aux:serialnumber="193020002656" aux:lensinfo="28/1 300/1 0/0 0/0" aux:lens="28-300mm" aux:lensid="6" aux:lensserialnumber="0000000000" aux:imagenumber="0" aux:flashcompensation="0/1" aux:firmware="1.2.3" photoshop:datecreated="2014-06-03t07:52:21.001" photoshop:legacyiptcdigest="3ab878c7de3e2c7d46fa1d558a375445" photoshop:colormode="3" photoshop:iccprofile="srgb v1.31 (canon)" xmpmm:documentid="f5ae03309fa9337f43ea71c52f6b6c0d" xmpmm:instanceid="xmp.iid:4e811e5e61f8e31183e6db5ea6c6987d" xmpmm:originaldocumentid="f5ae03309fa9337f43ea71c52f6b6c0d" dc:format="image/jpeg" xmprights:webstatement="http://www.mywebsite.com"> <xmpmm:history> <rdf:seq> <rdf:li stevt:action="saved" stevt:instanceid="xmp.iid:274f1a37-ad8a-40d8-b5d2-03cea0cf8c52" stevt:when="2014-06-04t16:44:12+01:00" stevt:softwareagent="adobe photoshop cc (macintosh)" stevt:changed="/"/> <rdf:li stevt:action="saved" stevt:instanceid="xmp.iid:4e811e5e61f8e31183e6db5ea6c6987d" stevt:when="2014-06-20t11:59:38+02:00" stevt:softwareagent="adobe photoshop cs6 (windows)" stevt:changed="/"/> </rdf:seq> </xmpmm:history> <dc:rights> <rdf:alt> <rdf:li xml:lang="x-default">this image property of company</rdf:li> </rdf:alt> </dc:rights> </rdf:description> </rdf:rdf> </x:xmpmeta>
but if add together or alter info manualy, jpg corrupted! ideas or approach much appreciated! regards
there no trivial way edit image metadata coldfusion. should utilize 3rd party tool (using cfexecute tag) or java library perform task. @ these answers:
how-to-modify-exif-metadata-for-jpeg-images-using-coldfusion how-to-imagesetexifmetadata-and-imagesetiptcmetadata-in-coldfusion coldfusion
Comments
Post a Comment