Sponsored Content
Full Discussion: print metadata to jpg
Top Forums Shell Programming and Scripting print metadata to jpg Post 302484944 by flash80 on Monday 3rd of January 2011 05:56:15 PM
Old 01-03-2011
Here is the Jhead output. but I only need th gps part.

Code:
alioune@baccus ~/GPStagtoPic $ jhead ML.jpg 
File name    : ML.jpg
File size    : 583257 bytes
File date    : 2010:12:28 16:45:05
Camera make  : Apple
Camera model : iPhone 3G
Date/Time    : 2010:11:18 18:40:28
Resolution   : 1200 x 1600
Flash used   : No
Aperture     : f/2.8
Whitebalance : Auto
Metering Mode: average
Exposure     : program (auto)
GPS Latitude : N 14d 40.54m  0s
GPS Longitude: W 17d 27.82m  0s
GPS Altitude :  53.00m

From that command I only need the following to be printed on the bottom left corner of the pictures.
Code:
GPS Latitude : N 14d 40.54m  0s
GPS Longitude: W 17d 27.82m  0s
GPS Altitude :  53.00m

---------- Post updated at 05:56 PM ---------- Previous update was at 05:54 PM ----------

Thx for your reply,
I have tested with the following error.

Code:
alioune@baccus ~/GPStagtoPic $ 
alioune@baccus ~/GPStagtoPic $ ls
001.JPG  002.JPG  003.JPG  004.JPG  006.JPG  GPStagtoPic.sh  IMG_0276.JPG  IMG_0327.JPG  ML.jpg
alioune@baccus ~/GPStagtoPic $ ./GPStagtoPic.sh 
convert -pointsize 18 -font /path/to/font.ttf -fill white -stroke black -strokewidth 1 -draw " GPS Latitude : N 14d 40.54m  0s  10,-50" -draw " Longitude:  10,-32" -draw " GPS Altitude :  53.00m   10,-14"  ML.jpg target.jpg
alioune@baccus ~/GPStagtoPic $ ls
001.JPG  002.JPG  003.JPG  004.JPG  006.JPG  GPStagtoPic.sh  IMG_0276.JPG  IMG_0327.JPG  ML.jpg
alioune@baccus ~/GPStagtoPic $

when I execute the imagemagick command
Code:
alioune@baccus ~/GPStagtoPic $ convert -pointsize 18 -font /path/to/font.ttf -fill white -stroke black -strokewidth 1 -draw " GPS Latitude : N 14d 40.54m  0s  10,-50" -draw " Longitude:  10,-32" -draw " GPS Altitude :  53.00m   10,-14"  ML.jpg target.jpg
convert: non-conforming drawing primitive definition `GPS' @ error/draw.c/DrawImage/3143.
convert: non-conforming drawing primitive definition `Longitude' @ error/draw.c/DrawImage/3143.
convert: non-conforming drawing primitive definition `GPS' @ error/draw.c/DrawImage/3143.
convert: non-conforming drawing primitive definition `Longitude' @ error/draw.c/DrawImage/3143.
convert: non-conforming drawing primitive definition `GPS' @ error/draw.c/DrawImage/3143.
convert: non-conforming drawing primitive definition `Longitude' @ error/draw.c/DrawImage/3143.
convert: non-conforming drawing primitive definition `GPS' @ error/draw.c/DrawImage/3143.
alioune@baccus ~/GPStagtoPic $

The file is generated but the wrong information is printed on it.
Image

Last edited by flash80; 01-03-2011 at 07:06 PM..
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Print the content of a directory in jpg file

Is there any possible way to print the contents of a directory to a .jpg file? I have a list of thumbnails (e-books) which I want to share (+500) but I don't know how to make this. I would appreciate a lot any comments regarding this issue. (4 Replies)
Discussion started by: agasamapetilon
4 Replies

2. Programming

Best way to dump metadata to file: when and by who?

Hi, my application (actually library) indexes a file of many GB producing tables (arrays of offset and length of the data indexed) for later reuse. The tables produced are pretty big too, so big that I ran out of memory in my process (3GB limit), when indexing more than 8GB of file or so.... (9 Replies)
Discussion started by: emitrax
9 Replies

3. Shell Programming and Scripting

Rename all ".JPG" files to ".jpg" under all subfolders...

Hi, Dear all: One question ! ^_^ I'm using bash under Ubuntu 9.10. My question is not to rename all ".JPG" files to ".jpg" in a single folder, but to rename all ".JPG" files to ".jpg" in all subfolders. To rename all ".JPG" to ".jpg" in a single folder, for x in *.JPG; do mv "$x"... (7 Replies)
Discussion started by: jiapei100
7 Replies

4. UNIX for Advanced & Expert Users

LVM - restore metadata on other disk

Hi guys, I would like to ask your opinion about my theory, how to fix my broken LVM without risking any data loss. I use Archlinux at home. I just love this distro, even it gives me a lots of work (particularly after system updates). Basic system spec: AMD FX(tm)-6100 Six-Core Processor... (1 Reply)
Discussion started by: lyynxxx
1 Replies

5. UNIX and Linux Applications

About gvfsd-metadata

I need a hint about gvfsd-metadata using mate on bsd. Or dual-core cpu, quad-core cpu ore an old laptop single core, the gvfsd is an obstacle and does not accelerate anything, vice versa, it slows down many processes, coming from gnome. So someone can give me a hint how to wipe it out for good? I... (1 Reply)
Discussion started by: 1in10
1 Replies
All times are GMT -4. The time now is 08:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy