Ulyssesonline

the tech surfer

  • Home
  • About
  • Archives
You are here: Home / 2009 / Archives for October 2009

Archives for October 2009

October 30, 2009

5 Ways To Figure Out Ubuntu Version

Like they say, there are many ways to skin a cat. In Ubuntu, there are at least five ways to figure out what version you are running on your system. From the Gnome Menu, you can navigate to System>About Ubuntu. This is by far the easiest. There are alternative ways of course. From the Terminal, you can type one of the following:

$ uname -a
$ lsb_release -a
$ cat /etc/apt/sources.list
$ cat /etc/issue

$ uname -a $ lsb_release -a $ cat /etc/apt/sources.list $ cat /etc/issue

If you know of other ways, please leave a comment.

Filed Under: General, Linux Tagged With: issue, lsb_release, sources.list, ubuntu, uname, version

October 27, 2009

Batch Watermark Images Using ImageMagick

In my previous post, I talked about using ImageMagick to resize images in a batch process. In this post, I’ll talk about leaving watermarks on images in a batch process. First of all, what is a watermark? A watermark is an image or text that appears on paper or photographs to prevent counterfeiting or for giving a photographer credit or ownership. It’s one way of getting recognition when distributing one’s artwork.

Let’s say you have a bunch of images about 30 or so needing a watermark. They all have an extension of JPG located in one directory or folder. First, if you haven’t already done so, install ImageMagick by typing in the Terminal:

sudo apt-get intall imagemagick

sudo apt-get intall imagemagick

Once you have ImageMagick installed, change directory to the folder where your images are located.

We will use the convert command to leave a text watermark at the bottom of each image. I will go over each of the options one by one. We will put all the options together in the end.

Convert all images with a JPG extension

convert *.JPG

convert *.JPG

Use the Arial font

convert *.JPG -font Arial

convert *.JPG -font Arial

Use a fontsize of 16

convert *.JPG -font Arial -pointsize 16

convert *.JPG -font Arial -pointsize 16

Place the watermark at the bottom center of each image

convert *.JPG -font Arial -pointsize 16 -draw gravity south

convert *.JPG -font Arial -pointsize 16 -draw gravity south

You can place your watermark text anywhere you want it, for example at the top of the image, the side or at the corner. I placed it in the bottom center. It’s just a personal preference.

Write a black text at position 0,12 supplied inside a single quote.

convert *.JPG -font Arial -pointsize 16 -draw "gravity south
fill black text 0,12 'Photos by: Ulysses'"

convert *.JPG -font Arial -pointsize 16 -draw "gravity south fill black text 0,12 'Photos by: Ulysses'"

By the way, the command is all on one line. I placed it on several lines for readability.

Write a white text at position 1,11 supplied inside a single quote.

convert *.JPG -font Arial -pointsize 16 -draw "gravity south
fill black text 0,12 'Photos by: Ulysses'
fill white text 1,11 'Photos by: Ulysses'"

convert *.JPG -font Arial -pointsize 16 -draw "gravity south fill black text 0,12 'Photos by: Ulysses' fill white text 1,11 'Photos by: Ulysses'"

The reason we are writing black and white text that are slightly offset is for our watermark text to display regardless of background color. It’s a technique similar to creating a drop shadow. This ensures your watermark text is readable regardless of the color of the background image.

Finally, name the watermarked images in this format.

convert *.JPG -font Arial -pointsize 16 -draw "gravity south
fill black text 0,12 'Photos by: Ulysses'
fill white text 1,11 'Photos by: Ulysses'"
watermark.JPG

convert *.JPG -font Arial -pointsize 16 -draw "gravity south fill black text 0,12 'Photos by: Ulysses' fill white text 1,11 'Photos by: Ulysses'" watermark.JPG

The watermarked images will be written as watermark-0.JPG, watermark-1.JPG, watermark-2.JPG and so forth. So, there you have it. You just watermarked 30 or so images in a batch process using ImageMagick.

Filed Under: General, Linux Tagged With: batch, imagemagick, images, watermark

October 27, 2009

Batch Resize Images Using ImageMagick

If you are using Linux and you need to resize a hundred images or so, you can certainly use Gimp, but that would be too much work. Consider ImageMagick set of graphic tools. You can install ImageMagick on Ubuntu by going to the Terminal and typing: “sudo apt-get install imagemagick.” Once the application is installed, all you need to do is go to your image directory and execute the following command:

mogrify -resize 900x600 *.jpg

mogrify -resize 900x600 *.jpg

This command will resize any image with a .jpg extension to a size of 900×600 pixels.

One more thing. Make a backup of your originals.

Filed Under: General, Linux Tagged With: batch, imagemagick, jpg, mogrify, resize

  • 1
  • 2
  • 3
  • …
  • 9
  • Next Page »

Copyright © 2003 - 2018