Read metadata of jpeg

hi guys:
I have a problem about using ImageReader.reader.getImageMetadata to fetch metadata from a jpeg file . Unfortunately, i got such error
Exception in thread "main" javax.imageio.IIOException: ICC APP2 encountered without prior JFIF!
It seems like a bug of java . How could I resolve it?
Besides that, I have another question. Could we get one or two specific metadata from a jpeg file without load whole file into the memory. For example, I only want the location information in a photo which are took by my iphone.
Please help me . I'm not a image handling expert.
Thanks.

Some points should help.
1. There are two types of meta data available from after reading, or before writing with an image.
a. stream meta data
b. Image meta data
2. you need to read the image completely first with the java.imageio.ImageReader of which you can choose to read only image-index number "0" (that is the main image) . ( and generally there are no extra index of images - "no thumbnails").
3. You can obtain the Image meta data better from the returned IIOImage object, but finally you will need to be good at making iteration loops to use the getTree() method to obtain the XML "org.w3c.dom.Node" that contais the meta data, that has been formatted by the java API.
4. About the "JFIF" name in .jpeg and .jpg streams , it does not like that "format name" on the stream and throws an error , i haven't used the newer JAI classes at this time that use Tiff format and JPEG 2000 format.
Only .tiff .jpeg .jpg extensions in java can have EXIF data , "stream data is independent of" EXIF and GPS info, and is with the image type/format spec.
note .jfif is an extension sometimes found on jpeg and jpg types and heavily realted compressor specs that carry non stream meta data.
Edited by: 893871 on 30/10/2011 11:34
Edited by: EJP on 31/10/2011 09:25: thanks for your answer although you're a year late. Removed your question which should be asked in a new thread. Nobody will see it here and in any case reviving old threads with new questions is considered bad form. Locking this thread.

Similar Messages

  • Bridge CS3 not writing metadata to JPEG files

    For the last couple of months (without my noticing until a couple days ago) all JPEG files that I have edited using Bridge CS3 (on Windows XP) do not have the metadata built into the file. Here are the symptoms: use "File Info" to edit the metadata for a JPEG file (i.e. add a title, description, copyright info, etc.), all appears normal, but if you do any of the following, the metadata you entered disappears:
    - duplicate (the metadata does not exist in the duplicate file)
    - move or copy to another folder
    - open in Photoshop or any other software that can read metadata (File Info shows none of the metadata you entered)
    - rebuild the cache for the folder
    Strangely, the metadata still appears with the file when you look at it in Bridge as long as you don't do any of the above.
    This is really awful as I've put a lot of time into entering this metadata for hundreds of files. Older files (pre-Nov 08) don't have this problem and the metadata is "sticky" and doesn't get deleted. So, somehow my Bridge CS3 got corrupted along the way.
    Has anyone experienced this and more importantly -- do you have a solution? I've tried reseting all Bridge settings (but that of course purged the cache and deleted all my metadata.)

    Hey,
    There are various date/time fields shown in properties panel in Organizer. The dates mentioned in general section are read from OS whereas the dates in EXIF field are read from image's EXIF data. In EXIF data there are three date/time fields-
    1. Date time- This date/time info shows date modified of EXIF properties. So when you are writing a tag into imags's IPTC, you are doing some change in EXIF data. Hence this date should change to date when you are writing a tag into IPTC.
    2. Date time original - Represents date time when a image was shoot.
    3. Date digitized - Represents the date when the image was digitized (in digital camers there is hardly some delay between an image is shoot and it is digitized. So this field is always same as date original).
    So, in your scenario, Date time in EXIF should change whenever you are writing any tag into its IPTC.
    Please let me know if you need more info on it.
    ~Andromeda

  • Changing pixel density metadata in JPEG

    Hello:
    Does anybody know of a way/utility to batch mode change the pixel density metadata in JPEG files? I have this Phillips digital frame which won't display images properly when the JPEG DPI information is 72, regardless of the real pixel width and height of the images.
    Editing it in Photoshop works, but it also rewrites the data of the image, recompressing the JPEG a second time, cumulating artifacts.
    Thank you for your suggestions,
    Yann

    All other applications do what they're supposed to with Windows font settings, so I'm not going to set it to 100% and mess them up because Firefox is weird.

  • Will LR4 read metadata from NX2 NEFs

    Hello, I can't seem to find an answer to this, so perhaps someone can assist:
    I have just bought a refurb' imac 27" and have imported my photos to the imac, inside a folder I have created inside picture called 'Lightroom 4 photos'
    The photos were originally NEFs on my windows laptop, and were imported/edited originally using the Nikon programs transfer, view nx and capture nxw,  They all contain my copyright info etc, and have been keyworded. I am about to import them into LR4, but a little niggle is stopping me. I understand that LR4 won't read my NX2 edits, but can't find out whether a) LR will read the existing metadata so I have to do nothing, or b)I will have to enter all metadata again into lightroom.
    I have about 800 photos, so wouldn't be a huge problem if I needed to re-enter
    I would appreciate any help, and further comments, Thanks
    Roy Kaye

    Hi finesse99,
    NxToo was designed primarily to be able to use NX2 as editor in a Lightroom-centric workflow. Where Lightroom-centric means, among other things: Lightroom is for metadata, NX2 can be used for develop edits.
    To make a longer story shorter, there is no specific feature to transfer metadata (e.g. keywords and ratings) from NEFs, as written by NX2, to NEFs in Lightroom (catalog).
    There is a way to do this, which should be fine for a one-time shot (not optimal for a convenient ongoing workflow), e.g.
    * transfer metadata to xmp using exiftool command:
    exiftool -xmp -b {filename}.nef > {filename}.xmp
    Note: this will overwrite all of your existing xmp files.
    (consider puting this in a batch file, or just change the filename of an exiftool executable to implement batch mode, for example - this filename will do it: 'exiftool (-xmp -b -o %d%f.xmp).exe', but *won't* overwrite existing xmp files, so you'll need to pre-delete them)
    (another option is to use a shortcut to pass parameters - documentation on exiftool website...)
    Drop all of your nefs on the exiftool executable, shortcut, or batch file, then read metadata in Lightroom.
    Lightroom will incorporate the part it understands (e.g. ratings and keywords) and leave the rest, so it's a fairly safe operation, although *do* backup your catalog first just in case.
    Consider re-saving xmp of all nefs afterward, in Lightroom, so xmp files are re-populated with all Lr-supported metadata, if you like having the xmp sidecars around and up2date. Otherwise, all xmp files can be deleted, since NX2 metadata will be now be in Lr catalog.
    The other option I mentioned previously (extract jpeg previews from the NEFs in Lr so NxToo transfers metadata to the jpegs, then sync the jpegs back to the nefs using RawPlusJpeg or Syncomatic) will not work, since Lr metadata will take priority over NX2 metadata. (one could easily modify the code to change this behavior, but that would take lua coding know-how).
    If you need help with the my plugin(s), please contact me outside the forum. help with exiftool can be done in-forum since people don't get so irked when I help other people with software that wasn't written by me personally .
    Rob

  • Read metadata from file cancel modifications !

    Hi,
    I use Lightroom 1.1 in french. I made some photo (in raw but in jpeg the result is the same) and import them in Lightroom with conversion in DNG. In Lightroom, in develop module, I crop, change contrast and som others.
    After that, I geotag my DNG files with HoudahGeo. HoudahGeo write geotag in the file. So back in Lightroom, I make a 'Read metadata from file' ('Lire les métadonnées depuis les fichiers' in french) for having geotag in Lightroom.
    Geotag are now in Lightoom, nice, but in develop history, I have a new line 'Rénitialiser les paramètres' !!! So I can't see all my modifications... Is it normal ?
    Thank you
    PS: Sorry for my english...

    I think you should test this with one or two pictures - import/convert, save metadata to file, geotag, read metadata. Also try import/convert, make small adjustment, save metadata to file, geotag, read metadata. In iView I often write metadata to DNG's that have been adjusted, then read the metadata in Lightroom - sometimes I add more data in iView and do more adjustments.
    I have seen the problem you describe, but it has been with raw files which I have adjusted in Lightroom but haven't saved out the metadata. I have then created an xmp sidecar in iView, and read the metadata in LR. So the sidecar had no ACR/LR instructions. The result was that my adjustments were wiped out. What I suspect is that something similar is happening with your DNGs - that conversion creates them but doesn't write the ACR/LR fields.
    So try a few alternative sequences.
    John

  • How to read metadata from a pdf file

    hello
    i have got xmp sdk for windows.
    i want to read the metadata from a pdf file but i cannot
    find a way to do so.
    i cannot understand that which method to use to open the file whose metadata i want to read.
    if someone can tell me by an little code example then it would be great help.
    thanks

    The sample XAPDumper read metadata in a file (PDF or not) if it is valide. If you want to keep the XAPMeta object, don't delete this object in ProcessSubstring().

  • Bug: Keywords behave incorrectly after "Read Metadata from File"

    (Happens in LR3.4 RC and probably also in previous versions... but I am not sure if it happened in LR2)
    The problem seems tro be somthing like de-sync of database status and what we see on the screen.
    1) Let's say we have a photo with keyword "abc"
    2) Click in the Keyword List on the arrow around the "abc" keyword to show only photos with this keyword (single one), leave the filter on this settings
    2) Save Metadata to File
    3) Edit XMP in an external application, add new keyword "def"
    4) Read Metadate from File
    5) Now what happens is: The photos disappers from the screen as if it lost the "abc" keyword (weird), but if you look at the Keyword List, the "abc" keyword has still 1 photo attached to it. Also, if you release the filter and find the photo, it clearly has the "abc" and "def" keywords in the Keywording panel. And you can search for this keyword in the text filter (works correctly), but if you click on the arrow around the "abc" keyword, the photo is not shown.
    6) If you restart the Lightroom, it will work correctly again.
    I have an own application that is able to modify the XMP and the modifications may not be perfect, but in my opinion, this shouldn't happen when reading the metadata. If any developer is reading this, I can supply a file with original and changed metadata for debugging.
    It would be great it this could be resolved.
    Thanks!

    Please do report your find with the details you state (well done!) here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Thanks.........

  • Import metadata to jpeg files

    i want to import massively metadata to jpeg files.
    Can you help me to import metadata such as keywords.
    I have already tried with xmp toolkit of Adobe but the metadata
    is not readable from file info in Adobe Photoshop CS2
    What seems to be the problem ?
    I 'm using windows xp

    I can probably help with this.
    I have a script called TagFromFilename that can apply fill in the details that can be extracted from the file path if the .wavs are stored in the layout <Album Artist>\<Album>\[D-]## <Name>[ - <Artist>].<Ext> where D is an optional leading disc number and <Artist> is an optional trailing artist (otherwise both artist and album artist are set to the grandparent folder). You just need to make sure that before you add the tracks to iTunes, that it won't rename the files. You can do this by turning off the Keep option if the files are inside the media folder, or the copy option if the tracks are located outside.
    Alternatively I have another script called ExportImport which allows for almost any editable to be adjusted, as long as you can export the internal track IDs of each track and then marry them up with the data you want to import. See Batch Add Comments Tag Solution? for a previous example of how if might be done. I'll gladly go into more detail if you tell me what fields you already have and what identifying information is present.
    tt2

  • Error: Could not read Metadata from Portal Database !

    Hi All!
    My problem is when i am trying to open the portal page (Oracle 10G)
    http://domain/portal/page?_pageid=6,1,6_13&_dad=portal&_schema=PORTAL
    then i have an Error: Could not read Metadata from Portal Database.
    And i do not know why because everything is up and running. I can connect and browse my database schema with portal user. I can connect to pls/orasso and where ever i want.
    [07/Feb/2006:00:57:23 +0100] "GET /pls/portal/htp.p?cbuf=Test HTTP/1.1" 200 5
    plz help i am trying to fix this in the last 2 weeks :)
    thx kEndE

    Hi Andreas,
    I've changed the permissions to 775 and changed the ownership of /sapcd (volume name) to orasid:dba (including all files within the staging area /sapcd/ora-patch).
    So the permissions and ownership seems to be fine.
    I've also ran your suggested commands but the issue still exists.
    I'm now liasing with our UNIX guy to check if there is any underlying permission issues on the volume (sapcd) that may be causing this problem.
    In the mean time, let me know if you have any further thoughts.
    Thanks,
    Chris

  • Include Develop settings in metadata inside JPEG, TIFF, and PSD files ignored when unchecked

    In the Catalog Settings under the Metadata tab, I have unchecked the option 'Include Develop settings in metadata inside JPEG, TIFF and PSD files'.
    I then selected a JPEG photograph in the Library module and chose Metadata/Save Metatdata to File.  I wanted to save the metadata that I had added (keywords, IPTC, rating, etc), but not the develop settings.
    I then imported the jpeg back into another catalog.  The metadata I had added was there as expected, but so are the develop settings.  This I did not expect or want.
    Have I got something wrong here?  My understanding is that turning off the 'Include Develop settings in metadata inside JPEG, TIFF and PSD files' option means that develop settings are not written to the xmp area in non raw files such as jpegs.
    Looks like a bug to me.
    Tony

    Hello all,
    I have investigated this problem further and now have the answer.  It is not that the option "Include Develop settings in metadata inside JPEG, TIFF, and PSD files" is ignored, but it appears that the LR catalog is not properly updated when this option is turned off.
    Here are steps to test and illustrate the problem:
    1. Create a new folder and place a copy of an original jpeg image (original from camera) in the new folder.  Make sure you keep the original safe and only work on copies.
    2. Create a new catalog in Lightroom 2.3.
    3. Import the jpeg image from the new folder.
    4. Add some metadata (keywords, ratings, title, caption, IPTC data, etc).
    5. Make some Develop adjustments to the image.
    6. Open "Catalogue Settings" from the Edit menu and check (enable) the option "Include Develop settings in metadata inside JPEG, TIFF, and PSD files".  Uncheck (disable)  the "Automatically write changes into XMP" option.
    7. Select "Save Metadata to File".
    8. Delete the jpeg image from the Library module, then re-import it.
    9. Copy the original image back to the new folder, replacing the updated jpeg (once again, the jpeg image now contains no metadata from Lightroom).  At this stage, Lightroom fails to recognize that the metadata in the LR catalog doesn’t match the metadata content in the jpeg file.  I would have though that it should.
    10. Open "Catalogue Settings" from the Edit menu and uncheck (turn off) the option "Include Develop settings in metadata inside JPEG, TIFF, and PSD files".
    11. Reset the Develop settings.
    12. You now need to make a change to the metadata like increase or decrease the rating (otherwise LR won’t save any metadata to the jpeg file - LR is being too smart and thinks it’s already up to date, so does nothing when you do the next step).
    12. Select "Save Metadata to File".
    13. Delete the jpeg image from the Library module again, then re-import it again.
    14. Look at the develop settings (that you specifically did not want saved within the jpeg file in step 10).
    Although the Develop settings were Reset in step 11, you have ended up with the original Develop settings from step 5.  It is true that LR has not saved the reset develop settings, but it also hasn’t removed the old develop settings that are still stored in the catalog.  This must be considered a bug (oversight).  Note that it has also saved an Import snapshot as well.
    For the more technically minded (and the LR developers if you are listening), the field "xmp" in the table "Adobe_AdditionalMetadata" is not updated (old camera raw settings and snapshot settings are left behind) when the "Include Develop settings in metadata inside JPEG, TIFF, and PSD files" option is unchecked (disabled) and it seems that this is the data that is written to the jpeg file when you select "Save Metadata to File".  Note that the state of "Automatically write changes into XMP" has not effect on this process - I tried it on and off.
    Hope that this might be of some help to others one day.
    Tony

  • Reading metadata with exiftool

    OK, let's bounce this one around and see if anyone has an elegant solution!
    I'd like to read metadata that is in images/sidecars, but which LR doesn't display, and put the information into custom fields. While it would be great to have direct access - ie the SDK should let you read XMP data from files or from the Additional_metadata SQL table - in in its absence I am using Exiftool to extract that information. Where I hit a roadblock is that LRTasks can send the correct command line, but LRTasks.execute only returns a 0 or 1, the OS exit message, and not the Exiftool string.
    So I'm forced to look at alternatives. One would be to make Exiftool generate a temporary file, and then attempt to read that. Any other ideas - or support for the above feature request ?
    John

    Hmmm, I responded via email 8 hours ago yet it hasn't shown up. This response might be duplicated if there's just a big latency:
    John - Yes, it's frustrating knowing how much powerful functionality is sitting there but not accessible to us. I hope the SDK opens up much more in upcoming versions.
    Let me know when/if you proceed with this particular idea. I have a project I'm going to need this for in about a month or so and it'd be nice to not reinvent the wheel. If you won't need it until after that, I'll get it going and then we can compare notes when you're ready. Plus, I'm on Windows and would need a Mac user to verify things are working - I assume you'll need the reverse (?).
    db

  • MFT-5031_Error occurred while reading metadata of file

    Am facing the error below while using OMFT to transfer files to a remote FTP server.
    Error occurred while reading metadata of file.
    Action
    Check the adapter properties and try again. If the problem persists, contact Oracle Support Services.
    Error Description
    MFTException [threadName=JCA-work-instance:JMSAdapter-0, errorID=a4322627-8aa5-4796-ae77-3e1576f2e3dc, errorDesc=MFT-5031_Error occurred while reading metadata of file [KE03122014FTSAF26336.AD2] from endpoint [FTPEndPoint: Host:[KRATESTSVR], Port:[5454], User:[Safcom], Folder:[/Files]]., cause=oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: file://wsdl/FileListing_ptt.wsdl [ FileListing_ptt::FileListing(part,part) ] - WSIF JCA Execute of operation 'FileListing' failed due to: Error in listing files in the remote directory. Error in listing files in the remote directory. Unable to list file in remote directory. ; nested exception is: BINDING.JCA-11430 Error in listing files in the remote directory. Error in listing files in the remote directory. Unable to list file in remote directory. Please make sure that the ftp server settings are correct. ]
    Error Text
    Error occurred while reading metadata of file [KE03122014FTSAF26336.AD2] from endpoint [FTPEndPoint: Host:[KRATESTSVR], Port:[5454], User:[Safcom], Folder:[/Files]].

    Yes i am also running with same version 7.0(1) SR5 but
    this error is showing me when i am configuring resources to a new agent if i go directly from RMCM it works fine
    please let me know if some has solution on this.
    Waiting for your replys.
    Thanks & Regards

  • What is([103]) xcscredd(103) deny file-read-metadata /Users

    Hi all, Recently I found that after installed Mac OSX Server and some VPN server , on system monitor recorded many messages about :
    ([103]) xcscredd(103) deny file-read-metadata /Users , and gen many report on
    file:///var/log/asl/AUX.2014.02.20/383655
    do any member know what is these happened ? and how to stop it.
    I set OSX server on private network ,  success connect iPhone to OSX VPN server but cannot access internet from it. Oh....
    not user frirendly to operate OSX Server...
    any helps to slove these 2 problem ?

    1. Open the terminal
    2. type
    sudo vim /Applications/Server.app/Contents/ServerRoot/System/Library/Sandbox/Profiles/xcscredd.sb
    3. enter
    (deny file-read*    (subpath "/Users")    (with no-log) )
    into the file
    To edit the file you have to press i.
    4. The press ESC and then :wq (Enter)
    But you shouldn't do things like this, if even don't know how to change a text file.
    It's on your own risk.

  • How do I get Bridge and Lightroom to respect - read - metadata changes?

    I cull my wedding images in Bridge (CS 6) and then export them into LR 4.  I typically rate images as I'm culling, but when I import those images into LR, the ratings don't carry over.  Likewise, when I label images in LR and export them, Bridge shows all the color labels as white - regardless of which label was actually assigned. 

    Lr saves all edits and any other metadata changes in its database (= the catalog).
    Additionally to the catalog you can <save to file>,i.e. to a xmp-file (in case of a Raw photo), or in the header (but not in the image pixels!) of a JPG, TIFF, or PSD.
    Saving to file is done by
    _ either checking the box <Automatically save changes to xmp> in >Edit >Catalog Settings >metadata tab, or manually
    _ by going >Metadata >Save metadata to file (in Lr Library Module), or
    _ by going >Photo >Save metadata to file (in Develop Module.
    When you save manually to file you can select multiple photos in the Grid Mode and do <Save metadata to file>.
    This saving to file is necessary in order that Bridge can read and display the Lr edits because Bridge cannot read the Lr catalog.
    Bridge saves to file automatically (there is no option of deselecting it) and Lr will read the metadata from Bridge when you import the image into Lr.
    In case of an image that is already in Lr you have to select >Metadata >Read metadata from file (in Lr Library Module), or 
    by going >Photo >Read metadata from file (in Develop Module). Without this <Read metadata from file>, Lr will not display any changes made in Bridge after the import  into Lr. Since this <read metadata from file> would overwrite any different edits you may have done in Lr, it is best to do this before you do further edits in Lr.
    The rating stars should transfer from Bridge to Lr and vice versa without problems.
    For the color labels to transfer correctly you have to make the textual descriptions for the individual colors identical in Lr and in Bridge - down to upper/lower case, commas, hyphens, underscores, etc.
    Having said this:
    I would recommend that you do not use Bridge for culling your images. You can do the culling just as easy in Lr. When you manage photos in Bridge and in Lr, you will always have the problem of synchronizing the metadata. This can be done but it needs a meticulous workflow that is adhered to strictly.
    There is nothing in Bridge that Lr cannot do *). Make your life easier and choose Lr as your only image management and editing tool, except for CS6 itself (I mean Photoshop itself, not the ACR ).
    *) Well there is one thing: Since Lr is not a browser-based program it does not automatically "see" what is on a hard drive. Photos need to be imported in order that Lr will "see" them.
    Bridge is browser-based. Whatever photo is on a hard drive - irrespective of which program put it there - it will be "seen" by Bridge.
    So Bridge is a valuable tool if a photo is not displayed in Lr and you want to check if it is in a particular folder.

  • What does "Include develop settings metadata inside JPEG, TIFF, and PSD files" do?

    I am wondering what the option "Include develop settings metadata inside JPEG, TIFF, and PSD files" found in catalog settings/metadata does?  what happens if you uncheck it?

    Bob12312321 wrote:
    also when this is unchecked will lightroom still save keyword changes to raw(nef) files?  thank you!
    Metadata ("real" metadata like keyowords nor develop adjustments) are never saved into non-DNG Raw files (like .nef, .cr2) directly. With these files, there is always a so called sidecar file (with the extension .xmp) created to hold the XMP information.
    And yes, if the option is unchecked, LR will save the keywords to the XMP sidecars, when you perform "Write Metadata to File" or have the autowrite option active.
    Beat

Maybe you are looking for

  • How to measure current and voltage and rpm with daq device

    i am measuring current and voltage and am wondering should i use shunt resistors or current sensors hall effect sensors. i have a pci 6221 and a scc-68 breakout box. what specifications or size should the shunt resistor/current sensor be or should i

  • Automatic creation of serial number

    Hello guys,    In serial number profile, in serializing procedure for PPAU and PPRL i have maintained 4-automatic(creation of serial number) and this serial number profile i have given in workscheduling view of material master.When i create the produ

  • Instant Messaging no longer works for me..why?

    Instant Message came pre-loaded on my iPad 2 when purchased over 2 years ago.  Always worked.  Ever since downloading IOS7 and related fix-packs, no longer works.  Ive gone to Settings and what I see does NOT match the directions apple.support.  What

  • Completion Workflow WS14000044

    Hello, We are in the process of migrating from SRM4 (Standalone Scenario) to SRM7. We need to update the existing Shopping Cart approval workflow by adding new approver levels. Currently we are using a customized version of the n-step dynamic approva

  • Still no satisfactory answer to my previous question - How Do I Downgrade from CC to Photoshop?

    I asked the above question a few hours ago and Adobe's Rajshree responded and said I could simply log in to Adobe.com, purchase the new Photoshop + Lightroom CC offer, and then let her know my order number, and that she would then cancel my existing