Ed Greshko wrote:
Rikard Johnels wrote:
Hello all! I have a script that downloads the photos from a SD-card into a directory created with the date of "downloading". It then calls a second script that converts all the raw files to jpeg and place them in two sub folders under the parent. One for full size, and one for reduced.
My problem: I dont preserve exif data with the current script. I need to extend it and i dont know how.
I planed to use exiftool as it gives me every tag i want in its default state. But how do i make the script preserve the tags?
#!/bin/sh echo `find -type f |wc -l` images to convert. for x in `ls *.pef | cut -d. -f1` do dcraw -f -c $x.pef | cjpeg -quality 90 > converted/big/$x.jpeg convert -scale 20% converted/big/$x.jpeg converted/small/$x.jpeg touch -r $x.pef converted/big/$x.jpeg converted/small/$x.jpeg done
In your script you use dcraw and cjpeg. I don't believe these preserve exif data. However I do know that convert from ImageMagick does. Also, I believe convert can read, but not write, PEF files. So, why not just use convert?
When I wrote the above I didn't have a PEF file. I found an example, which I believe is OK, and used convert to transform it into a jpeg. While some conversions do preserve exif data, this conversion does not. I believe it because one underlying utility ufraw doesn't preserve the exif data. So, yes, it seems your idea to first use exiftool to read the exif data from the pef file first and write it back to the jpeg file at the end would be your best option. -- 葛斯克 愛德華 / 台北市八德路四段 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org