How to modify EXIF metadata for JPEG images using Coldfusion? - coldfusion

I am using Coldfusion to view images stored in the file system and I can READ the EXIF metadata of JPEGs, but I'd like to know if it is possible to modify this information and re-save the image.

I know that there are XMP and IPTC custom tags out there, I googled now and seems that javaloader.cfc + some java lib are your only sure option.
EDIT: Since I work on stock photography application I got interested and found this command line tool which could do the trick:
http://www.sno.phy.queensu.ca/~phil/exiftool/

Related

What is the relationship between exif and xmp? Are they interchangeable?

I am writing an application which read/write metadata for an image (it converts a raw file into a jpeg/tiff) and I need to write metadata about camera/mode/...into the generated jpeg.
I know that I can do this using exif and in windows I am using GDI to do this. But I am reading information about xmp and xmp sdk from adobe.
I am wondering which one should I use? exif or xmp?
How they are relates to each other?
Why one may select to write exif metadata and somebody else may select XMP? What is the pros/cons of selecting any of them.
I am writing in c++ on windows (visual studio 2012)
If you are writing JPEG or TIFF formats, I think you should stick with Exif.
All TIFF format readers will be able to parse Exif, as Exif is a subset of TIFF (a sub-IFD with special Exif-defined tags). Most "JPEG" readers also know how to parse Exif/TIFF.
Now, you could of course add XMP to the file as well, but I suggest you do this in addition to plain Exif, and only if you really need it.
XMP does allow richer metadata. But as the metadata you have got is from a camera RAW file, I would think they map directly to Exif tags, given Exif was developed by the digital camera industry for exactly the use you describe.
So, basically: Go with Exif because it has better tool support. Add XMP only if you need it, for richer metadata.
XMP does indeed map values to exif tags.
Both EXIF and XMP are rich sources of image metadata.
The benefit of XMP is that it is easily readable and any XMP-aware application (like all Adobe products) can manipulate these properties.
XMP derives the values from the native values in the image, so basically XMP provides a mapping between properties in the exif block in images and reconciles these values in the XMP namespaces as defined in the ADOBE XMP SDK documentation.
The benefit of using the XMP SDK to manipulate metadata is that then the responsibility of reconciling between different image metadata formats (Like exif, IPTC or XMP) while reading or writing is transferred to the XMP SDK.
If any change is made to the XMP property, it is reflected back to the exif block in image. Similarly if any non-XMP aware application has modified the exif metadata without modifying the corresponding xmp value, at the time of read operation, the XMP SDK will reconcile this change into the XMP value and while writing, this change will be saved back.
Using the XMP SDK is to manipulate metadata is basically easier as you can leave a lot of format specific detailing upto the SDK to handle.
More information on different sources of image metadata is available on the Metadata Working Group.
The complete Spec can be downloaded from here.

Converting HTML file to PDF using Win32/MFC

As part of my application, my client has requested that I include an automated e-mailing system. As part of this system, I generate HTML code and use automation to send it via. Outlook.
However, they also require a PDF copy of the HTML document to be sent as an attachment. My initial attempts involved using libHaru, which proved difficult to use efficiently, as I was required to create the PDF document from scratch, which required computation of the position of each of the lines in a table, and positioning of all the text, etc.
I was wondering if there would be a way to programmatically convert HTML code (or an HTML file if need be) into a PDF document either by using Win32/MFC itself or an external library.
Thanks in advance!
EDIT: Just to clarify, I am looking for solutions which minimize external dependencies.
You should evaluate this utility wkhtmltopdf:
http://code.google.com/p/wkhtmltopdf/
You can call it from the command line without the need to run a setup.
I use it generating my output documents as html then cal a ShellExecute(...) to convert it to PDF. It's great!
Inside uses webkit + qt. So compability with modern HTML is OK.
Hope it helps.
I'd take a look at PDF Creator, which can be used as a COM object (that acts pretty much like a printer). I haven't used it to print HTML, so I'm not sure, but my guess is that you'll probably end up having to instantiate a web browser control to render the HTML, and then feed it from there to the PDF control.
Some possible answers are in this thread:
C++ Library to Convert HTML to PDF?
Not sure if they will satisfy your particular requirements, but these might at least get you started.
Edit:
Some other possible options here.
Not MFC but you can try QtWebKit. It can render and export HTML to PDF, PNG, JPEG

Exporting *.png sequence from *.fla with C++

I need an animation in my program. My designer draws animation in Flash and provides me with *.fla file. All I need is to grab 30-40 PNGs from this file and store them within my internal storage.
Is it possible grab resources from *.fla with C++ ? Probably, some Adobe OLE objects can help?
Please, advice.
Thanks in advance.
If I asked an artist to make me an icon I wouldn't expect to need to write code to convert a .3DS model into a usable icon format.
You can save yourself a lot of time and hassle by having your designer use File->Export and give you PNGs of the layers and frames instead of a .FLA file if that's the format you require for your implementation.
If that's not possible for some reason then you can probably find a flash decompiler that has a command line option which you could launch from your program to extract assets as part of your loading sequence but that is generally frowned upon because this is not the intended use of the proprietary format for .swf/.fla anymore than you should design applications to extract source code from a binary executable.
Assuming
You are using CS5
The assets used internally in the FLA are already PNG's as you want them to be.
Then simply get the FLA saved as a XFL file, and you will be able to grab them from the library folder ( but then why not just get them to mail you the pngs ? )
So if for some reason you can only get access to the fla and not the designer, then you can do it programatically by renaming the fla to .zip, extracting.. and you have the XFL format.

get metadata from jpg, dng and arw raw files

I was wondering if anyone new how to get access the metadata (the date in particular) from jpg, arw and dng files.
I've recently lost the folder structure after a merge operation gone-bad and would like to rename the recovered files according to the metadata.
I'm planning on creating a little C++ app to dig into each file and get the metadata.
any input is appreciated.
( alternatively, if you know of an app that already does this I'd like to know :)
Have you looked at the libexif project http://libexif.sourceforge.net/?
ok, so I did a google search (probably should have started with that) for "batch rename based on exif data arw dng jpg"
and the first page that popped up was the ExifTool by Phil Harvey
it supports recent arw and dng files, and with some command line magic I should be able to get it to do what pretty much what I want
exiftool -r -d images/%Y-%m-%d/%Y%m%d_%%.4c.%%e "-filename<filemodifydate" pics
-move files to folders (images/YYYY-MM-DD/) and rename files to YYYYMMDD_####.ext that are in pics folder(and subfolders)
hope this helps others
You should also try Adobe XMP SDK, which is great for its supported formats (JPEG, PNG, TIFF and DNG).

persist image or video into voldemort

I am working on my web service, and required to persist some image (jpg whatever) and video(wmv) into memmory. Just want to use single_node_cluster to feel voldemort.
Can anybody give me a hint of the configuration and sample code of voldemort? I mean how to configure the value type in stores.xml? protobuf? java-serialization?
Any sample or link would be helpful. Thanks
sample code is here. The same code is also in SAMPLE folder of voldemort installation.
Regarding image store in voldemort, you need to encode the image using base64encoding and then save the text generated in to the value.