[ubuntu-za] Command line image editor?
Quintin van Rooyen
quintin.vanrooyen at gmail.com
Tue May 5 05:38:22 BST 2009
2009/5/4 Phillip Pare <ptpare at lantic.net>
> Walter Leibbrandt wrote:
> > Quintin van Rooyen wrote:
> >
> >> Hey list.
> >>
> >> Do any of you know of a command line image editor?
> >>
> >> What I basically want to do is: insert imageA into imageB
> >> x=coordinates y=coordinates
> >>
> >> I want to be able to script this.
> >>
> >> Does Gimp maybe have an option like this?
> >>
> >> I googled but so far (page 4 of results) have not com across anything
> >> useful.
> >>
> >> Thanks in advace.
> >>
> >> --
> >> Quintin van Rooyen
> >> 0824772477
> >> quintin.vanrooyen at gmail.com <mailto:quintin.vanrooyen at gmail.com>
> >> The New SA Geek!
> >> http://blog.sageek.co.za
> >>
> > Hi,
> >
> > I don't know about the specific feature you mentioned, but I recall the
> > ImageMagick (imagemagick in the Ubuntu archives) package being described
> > as a very powerful command-line toolset for image manipulation.
> >
> > HTH,
> >
> >
> I tried copying your code into a file called webcam:
> #/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
>
> I then installed cur and tried to run webcam from a terminal. This is
> the output that I got:
>
>
> phillip at voogdy-study:/media/PHILLIP4G$ ./webcam
> tee: /home/phillip/Scripts/gtkdeskinf/image: No such file or directory
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 100 4386 0 4386 0 0 1154 0 --:--:-- 0:00:03
> --:--:-- 3185
> http://us.images.wildcam.com/camimages/20090504/kwa/kwa-1241463093.jpg
> /home/phillip/Scripts/gtkdeskinf/image.jpg: No such file or directory
> ./webcam: line 6: composite: command not found
> cp: cannot stat `woodtest1.png': No such file or directory
>
> I have obviously done something wrong: Any suggestions?
>
> Regards
>
> Phillip
>
Okay, so after typing out a lengthy reply on how to fix my bad
bash-scripting I quickly fixed the script to allow it to run from your home
directory. It still depends on some variables.
You need to install imagemagick. (sudo apt-get install imagemagick)
Your current gnome background needs to be saved twice, Save it as
background1.png in your pictures folder AND as background.png in your
pictures folder. Now you have to change your gnome backrgound to
background.png.
If you run the following script it should now work.
################################################
#/bin/bash -x
#This script is experimental and needs imagemagic to run.
#Download the source of the page where the webcam is and extract the image
url from the page.
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 ~/.image
#Get the image address from the file created by tee and download the image
to image.jpg.
wget -i ~/.image -O ~/.image.jpg
#use imagemagick's compose command to compose the images. The gnome
background image needs to be woodtest.png and the preferred background image
needs to be called wood.png otherwise the script will not work.
composite -gravity center ~/.image.jpg ~/Pictures/backgound1.png
woodtest1.png
#Copy the composite image to overwrite the current gnome background.
cp woodtest1.png ~/Pictures/background.png
############################################
Thanks for the feedback Philip, will you try this one and tell me if it
works? It should be run straight from /home/philip
Cheers.
>
> --
> ubuntu-za mailing list
> ubuntu-za at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-za
>
--
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/20090505/d4cdd7b9/attachment.htm
More information about the ubuntu-za
mailing list