Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4084066
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:23:34+00:00 2026-05-20T18:23:34+00:00

Is there a simple example to read/write metadata of e.g. a local .jpg? XMPCore

  • 0

Is there a simple example to read/write metadata of e.g. a local .jpg?
XMPCore ActionScript Reference

Unfortunately I was not able to apply the instructions from adobe.

A simple example will help me a lot!
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:23:35+00:00Added an answer on May 20, 2026 at 6:23 pm

    I’ve written a small snippet on the matter. this snippet is far from being proper tested, and is most definite not written in a clear and coherent way. But for now it seems to work. I’ll update as I work on it.

    From http://snipplr.com/view/51037/xmp-metadata-from-jpg/

    private function init(event:Event):void
    {
        var ldr:Loader = new Loader();
        ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
        var s:String = "link/to/asset.jpg";
        ldr.load(new URLRequest(s));
    }
    private function imgLoaded(e:Event):void{
        var info:LoaderInfo = e.target as LoaderInfo;
        var xmpXML:XML = getXMP(info.bytes);
    
        //trace(xmpXML);
        var meta:XMPMeta = new XMPMeta(xmpXML);
    }
    private function trim(s:String):String{
        return s.replace( /^([\s|\t|\n]+)?(.*)([\s|\t|\n]+)?$/gm, "$2" );
    }
    private function getXMP(ba:ByteArray):XML{
            var LP:ByteArray = new ByteArray();
        var PACKET:ByteArray = new ByteArray();
        var l:int;
    
        ba.readBytes(LP, 2, 2);
        /* 
        http://www.adobe.com/devnet/xmp.html
        read part 3: Storage in Files.
    
        that will explain the -2 -29 and other things you see here.
         */
        l = LP.readInt() - 2 -29;
        ba.readBytes(PACKET, 33, l);
    
        var p:String = trim(""+PACKET);
        var i:int = p.search('<x:xmpmeta xmlns:x="adobe:ns:meta/"');
        /* Delete all in front of the XMP XML */
        p = p.substr(i);
        /* 
        For some reason this left some rubbish in front, so I'll hardcode it out for now 
    
        TODO clean up
        */
    
        var ar:Array = p.split('<');
        var s:String = "";
        var q:int;
        var j:int = ar.length;
        for(q=1;q<j;q++){
            s += '<'+ar[q];
        }
        i = s.search('</x:xmpmeta>');
        i += ('</x:xmpmeta>').length;
        s = s.slice(0,i);
        /* Delete all behind the XMP XML */
        return XML(s);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there any way to remove an attachment from Zend_Mail object? Simple example: $mail
Is there an simple way of turning a string from Then go to http:/example.com/
Is there any example on how to implement a simple login page/dialog? I have
Sorry for this simple question, but I can't solve it... There is an example:
Are there simple libraries out there (.NET and Java) that are able to validate
I'm trying to write a simple program using WinSnmp in C++. There is very
Is there a simple way to in PowerShell (I imagine using gacutil.exe) to read
I've two questions about R. There are quite simple, but unfortunately I don't find
so I have a simple example--a fully crossed three treatment three context experiment, where
There is simple cipher that translates number to series of . ( ) In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.