[ubuntu-za] [GLUG-tech] Command line image editor?

Quintin van Rooyen quintin.vanrooyen at gmail.com
Sat May 2 18:00:10 BST 2009


SOL

2009/5/2 Mynhardt Burger <mburger at cs.up.ac.za>

> Wouldn't imagemagick be able to do this for you?:
> http://www.imagemagick.org/script/index.php
>
> Mynhardt Burger
>

Thanks Mynhardt.

Imagemagic did exactly what I needed. With it I could finish my script (ugly
as it is I present it to you for clarification)

---------------------
#/bin/bash -x

curl http://www.wildcam.com/public/cams/image_kwa.jsp | grep "
http://us.images.wildcam.com/camimages" | awk '{print $8}' | awk -F =
'{print $2}' | awk -F \> '{print $1}' | tee ~/Scripts/gtkdeskinf/image

wget -i ~/Scripts/gtkdeskinf/image -O ~/Scripts/gtkdeskinf/image.jpg
composite -gravity center ~/Scripts/gtkdeskinf/image.jpg ~/Pictures/wood.png
woodtest1.png
cp woodtest1.png ~/Pictures/woodtest.png
---------------------

This script allows me to periodically update an image of a webcam at a
waterhole and place it directly on my desktop with a cronjob. I told gnome
to use ~/Pictures/woodtest.png as the background, and gnome automagically
updates the image as soon as it is change via cp.

I had to put cp in the final line of my script because imagemagic takes a
good few seconds to complete its operation and then the background fades to
the flat color. cp is much quicker and updates the image before gnome
realises it is used by another operation. Change the image names to ones you
have and check it out!

Bear in mind that this is just a play script of mine and that I am not sure
if I am infringing on copyright by using the webcam stream without going
through the browser. And right now the Image is simply in the centre of my
desktop, next step is to move it, and add a picture of the day from
wikipedia to it as well.

CHEERS!

-- 
Quintin van Rooyen
0824772477
quintin.vanrooyen at gmail.com
The New SA Geek!
http://blog.sageek.co.za
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-za/attachments/20090502/66e77113/attachment.htm 


More information about the ubuntu-za mailing list