How to generate a prepared set of pictures for sharing on the internet
When working with pictures, you might have a set of original pictures, that can be prepared to fit a certain target and be shared on the internet. This procedure automates this proces.
Raw pictures can have non-efficient file names from the digital camera. This makes them hard to organize and list. Raw pictures can be huge in file size. This is a problem for storage, backup, transfer, upload and download. Raw pictures can contain hidden data from your camera, camera software and picture editing software. The hidden data can include automatic data, such as timestamps, face identification and software details. That can be a security problem.
In this example, we will prepare a set of raw pictures from a Canon EOS D30 digital camera for sharing on a social network.
The raw pictures are rotated and deleted as necessary. A copy of the raw pictures is prepared in a directory.
mkdir foobar
cp *.JPG foobar
cd foobar
The files are renamed according to time stamp. The comment field in the JPEG header is removed for security reasons. The data from graphical editors are removed for security reasons. The data in Exchangeable Image File Format (EXIF) is removed for security reasons. This is done using jhead, which a JPEG EXIF header manipulation tool, that is perfect for this task.
jhead -nf%Y-%m-%d-%H-%M-%S -purejpg *.JPG
If needed, the comment field in the JPEG header is set.
jhead -cl 'Open Tech SmbA <opentech@opentech.dk> holds the copyright to this picture.' *.jpg
The pictures are resized. This makes them smaller in file size and makes them fit. In this example, the pictures are resized to a maximum size of 720 pixels. This is done using mogrify, which is perfect command line processing tool for this task. mogrify is a part of ImageMagick. If the picture is horizontal, the picture is resized to a maximum width of 720 pixels. If the picture is vertical, the picture is resized to a maximum height of 720 pixels. The aspect ratio remains the same.
mogrify -resize 720x720 *.jpg
The pictures are watermarked using mogrify.
mogrify -font ~/Documents/fonts/excelates.ttf -pointsize 36 -draw "gravity southeast stroke rgba(255,255,255,0.05) fill rgba(0,0,0,0.05) text 0,0 'OT'" *.jpg
If needed, we can be rename the pictures to a number incremented and padded form, such as 001.jpg, 002.jpg and so on. This can be automated with the following bash oneliner.
a=1; for i in *.jpg; do new=$(printf "%03d.jpg" ${a}); mv ${i} ${new}; let a=a+1; done
The privileges are set.
chown opentech *.jpg
chmod 0600 *.jpg
Et kundestyringssystem er også kendt som et
In this example, we will import data from a Microsoft Excel spreadsheet into a
The information in
The Sigma BC 506 bike computer measures current speed, trip distance, trip time, total distance and displays current time. In order to do so, the computer must know the correct wheel size. In this example, we will configure the computer.