Sometimes, you could have the need to generate mouse movements or clicks from your application.
Often I have to manage the time on my embedded systems, in POSIX Operating Systems I can ask to the OS the time using the gettimeofday() function.
In the previous post :"How to resize an image using Ruby" I made a program that can be used to resize a single image using the Ruby Language and RMagick.
Now I want to extend this program to resize a variable set of pictures, and I also want to set the resizing rate at run time.
As I have already done with python (in How to add a text to a picture using python) , I'm going to write a simple program which adds a text over an image.
The text I want to add will be a simple string and it will be semi-transparent.
Ruby is a fantastic programming language, it provides a lot of features.
It can use the imagemagick to handle and filter pictures.
In this short script I'm going to resize a png image and then I'm going to save it with a new name.
Last week we've seen how to resize a picture using PIL.
Take a look to Resize an image using python to get more information on how to do this task.
Python provides a lot of useful tools and libraries to handle images.
If you want to modify an image you can use the PIL (Python Image Library) to apply filters, draw a line, draw a rect, draw an oval, draw an image, or draw a text on the image.