get metadata from jpg, dng and arw raw files - c++

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).

Related

Is there a way to display .eps (vector) files in Ruby on Rails?

I'm new to RoR and can't seem find anything that simply explains what file types are supported. I'm assuming .eps is not because it simply won't work in my app (other file types do such as .png so I know it's not some other problem), so curious if there is a workaround to get .eps images to show in a RoR app?
Appreciate any help.
Did some digging. .svg files work in Rails and they are vector images. I used an online file converter like this one to convert .eps files.
http://image.online-convert.com/convert-to-svg
Googled around and found this old project:
https://github.com/Bluejade/PrawnVectorImport
No activity for a while. They might just be done?

cPickle.load() doesnt accept non-.gz files, what can I use for .pkl files?

I am trying to run an example of a LSTM recurrent neural network that is presented in this git: https://github.com/mesnilgr/is13.
I've installed theano and everything and when I got to the point of running the code, I've noticed the data was not being downloaded, so I've opened an issue on the github (https://github.com/mesnilgr/is13/issues/12) and this guy came up with a solution that consisted in:
1-get the data from the dropbox link he provides.
2- change the code of the 'load.py' file to download, and read the data properly.
The only issue is that the data in the dropbox folder(https://www.dropbox.com/s/3lxl9jsbw0j7h8a/atis.pkl?dl=0) is not a compacted .gz file as, I suppose, was the data from the original repository. So I dont have enough skill to change the code in order to do with the uncompressed data exaclty what it would do with the compressed one. Can someone help me?
The modification suggested and the changes I've done are described on the issue I've opened on the git(https://github.com/mesnilgr/is13/issues/12).
It looks like your code is using
gzip.open(...)
But if the file is not gzipped then you probably just need to remove the gzip. prefix and use
open(...)

batch export psd files to png

I have thousands of psd files to save as png. The psd files are not different, except for a small text in the center of a image. Is there a way to automate the job?
Yes. Open your actions window. Create new action. Record yourself opening, saving the file as png and closing the file.
Then under File -> Automate -> Batch. Point it to your psd folder and select your action. It should run through the files saving them as pngs.
A quick google search may help if you're new to actions.
edited per author input :}
XnView does the job pretty well. It can batch convert most files into most formats. It also has batch transformations and batch renaming among other things.
I use it regularly to convert PSDs to JPG/PNG/GIF.
I would use Irfanview 's powerful batch engine. Free and super-fast.
Go to the Folder in Irfanview Thumnails
Select all files
Rightclick and "Start batch dialog with selected files"
Select PNG as output format.
Yes you can make a Photoshop action to save the png and than run it via batch. This unfortunately gets tricky when you want to use this action option and specify the destination where the processed files are saved.
Enter Dr. (Russell) Brown’s Image Processor Pro, an extension for Photoshop that does exactly what most people need. It's dead simple and can even stack multiple processes and output formats/destinations to each file.
It's part of Dr. Brown’s Services
- http://russellbrown.com/scripts.html

C++ Importing and Renaming/Resaving an Image

Greetings all,
I am currently a rising Sophomore (CS major), and this summer, I'm trying to teach myself C++ (my school codes mainly in Java).
I have read many guides on C++ and gotten to the part with ofstream, saving and editing .txt files.
Now, I am interested in simply importing an image (jpeg, bitmap, not really important) and renaming the aforementioned image.
I have googled, asked around but to no avail.
Is this process possible without the download of external libraries (I dled CImg)?
Any hints or tips on how to expedite my goal would be much appreciated
Renaming an image is typically about the same as renaming any other file.
If you want to do more than that, you can also change the data in the Title field of the IPTC metadata. This does not require JPEG decoding, or anything like that -- you need to know the file format well enough to be able to find the IPTC metadata, and study the IPTC format well enough to find the Title field, but that's about all. Exactly how you'll get to the IPTC metadata will vary -- navigating a TIFF (for one example) takes a fair amount of code all by itself.
When you say "renaming the aforementioned image," do you mean changing metadata in the image file, or just changing the file name? If you are referring to metadata, then you need to either understand the file format or use a library that understands the file format. It's going to be different for each type of image file. If you basically just want to copy a file, you can either stream the contents from one file stream to another, or use a file system API.
std::ifstream infs("input.txt", std::ios::binary);
std::ofstream outfs("output.txt", std::ios::binary);
outfs << insfs.rdbuf();
An example of a file system API is CopyFile on Win32.
It's possible without libraries - you just need the image specs and 'C', the question is why?
Targa or bmp are probably the easiest, it's just a header and the image data as a binary block of values.
Gif, jpeg and png are more complex - the data is compressed

How to modify EXIF metadata for JPEG images using 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/