Sometimes you need to share a number of raw pictures over the internet.
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.
Therefore, you might want to prepare raw pictures for sharing over the internet.
In the following example, we will prepare a number of raw pictures from a digital camera for sharing over the internet.
The pictures are rotated according to their orientation data in Exchangeable Image File Format (EXIF). The orientation data in EXIF is then reset. The pictures are renamed according to the timestamp in EXIF. The pictures will have their EXIF header removed for security reasons. All this is done using jhead, which a JPEG EXIF header manipulation tool, that is perfect for this task.
jhead -autorot -ft -nf%Y-%m-%d-%H-%M-%S -purejpg *.JPG
If the picture is horizontal, the picture is resized to a maximum width of 1000 pixels. If the picture is vertical, the picture is resized to a maximum height of 1000 pixels. The aspect ratio remains the same. This is done using mogrify, which is perfect command line processing tool for this task. mogrify is a part of ImageMagick. Note, that Facebook has a maximum of about 604 pixels.
mogrify -resize 1000x1000 *.jpg
We can now share our pictures over the internet.
If needed, we can apply grey scaling and then a blue tint. This effect will make all pictures appear blue.
mogrify -modulate 100,0,100 -fill 'blue' -tint 25 *.jpg
If needed, we can add text, such as a title or copyright notice. We set the font to our TrueType font, the font size to 16, the place to bottom, the font color shade to black and the font color to pink.
mogrify -font /usr/share/fonts/truetype/opentech/excelates.ttf -pointsize 16 -draw "gravity south fill black text 2,12 'Open Tech SmbA' fill pink text 0,14 'Open Tech SmbA'" *.jpg
If needed, we can add a watermark. We set the font to our TrueType font, the font size to 36, the place to bottom, the font outline color to white, the transparency to 10%, the font color to black and the transparency to 10%.
mogrify -font /usr/share/fonts/truetype/opentech/excelates.ttf -pointsize 36 -draw "gravity south stroke rgba(255,255,255,0.1) fill rgba(0,0,0,0.1) text 0,0 'www.opentech.dk'" *.jpg
Open Tech SmbA can help your company automate picture and image processing. Contact Open Tech SmbA by mail at opentech@opentech.dk or call Open Tech SmbA at +45 43 62 22 88.