• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Reading .jpg MetaData with JavaScript  RSS feed

 
Greenhorn
Posts: 17
Android Chrome Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I currently am having a hard time trying to read metadata from a .jpg file with javascript. The goal is to store a caption for a particular image in the "title" field of meta data for a .jpg image and read it to display on a web applet. I've looked into ImageInfo and what few examples I could find do not seem to work and I'm finding any kind of documentation for it sparse. At this point I'm completely at a loss at where to look (and yes we really have to use javascript for this) thank you very much in advance.

Edit: Here are two code snippet attempts I have made


 
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly happens when you run this code? Please TellTheDetails. <-- click

The first thing I would try would be an absolute path to the file. Are you sure your code is finding the file? Relying on default directories can lead to hard to diagnose bugs.
 
Oceas Anderson
Greenhorn
Posts: 17
Android Chrome Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes the file was being found and was easily displayed however I have resolved the issue thank you for your response.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can tell us what you did to resolve the issue, it might help someone else in the future.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What did you do to correct this? I found this original code source like you that was using other metadata like height, width, etc. I have been trying to use it to get title like you have here.

I know this is a long shot, since the question was asked a few years ago, but it's worth a shot.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!