command line image manipulation (imagemagick?)
I think imagemagick is what I need for this, and I am looking at that site now, but mor einput would be nice.
Basically I have a dual monitor setup, xinerama so both seem to be one desktop. I want each screen to have a seperate background, this is simple, open the 2 backgrounds I want int he gimp create a new image the size of my desktop and place one image on each side... Now it gets tricky.. I have a lot of backgrounds I cannot choose between. So I wrote a perl script that chooses 2 images fromt he directory at trandom every 30 seconds. I then also have it set the background when the images are chosen... what I need is a command line tool I can use in my script to combine the 2 images side by side. whats more some images are to large and need to be scaled down.. others are small and need to be centered on the screen they will eb on. Yeah.. I know it is a pain in the ass... but hey it's a fun task. Any help with imagemagick or other programs on any part of what needs to be done would be helpful. |
solution
ok, I got it, messing around witht he imagemagick stuff, and re-learning some basics of how to do what with images...
Anyway if anyone else is interested int he script I commented it to a certain extent, most perl people should be able to make any needed changes. Code:
#!/usr/bin/perl |
Great script! Thanks for posting your solution.
I would have probably chosen a bash script with netpbm as the tools to use for this one. But, since you did the work, I did not even get a start on it. |
oh, I modded the script a bit, I changed all the commands within it to run |nice -n 19 command| because the image manipulation commands would sometimes bog down the system (athlon 64 3500+ w/ 1gb ram and a tmpfs drive for the temp files).
I will mod my script above. Oh, I also changed it to remove temp files it makes after resising the images, this is because I have TONS of images, and my temp space is a 1gb ram drive, having them all linger around was not good. |
All times are GMT -5. The time now is 02:54 PM. |