I need a command or mini scripts that can find certain type of images file recursively from the current dir with files of minimum 736 width and resize them by "736 max width, relative height" and replace the source files. I currently have GD installed but can also install Imagemagick if needed, I'm not sure which is better. Is this possible? Help is appreciated. Thanks in advance.
No, you don't have it correctly. There are a couple problems with your line:
1. convert takes 2 filenames:
If you want to perform the operation on the same file, use mogrify instead.
Note that this will overwrite the original file!
2. You are not passing the filenames that find prints to convert. This is done using {}. E.g.
But that will keep the suffix, so file image.jpg will become image.jpg.resized.
When renaming with find, it is safer and more convenient to create a script and then do -exec myscript.sh {} \; on a whole set of files.
At first your script can echo the command you are going to run, then you verify the terminal output that it looks right, test it on one or few files and then run it on the whole set.
If you are sure you want to overwrite your inputs, just use mogrify:
I don't know what '>736' specifier means. I assume you got that correct.
Ultimately, I'm looking to create a script that allows me to plug in a usb drive with lots of jpegs on it & copy them over to a folder on my hard drive. So in the process of copying I am looking to hash check them, record dupes to a file, copy only 1 of the identical files (if it doesn't exsist... (1 Reply)
Hi & good day,
How to use find correctly ?
I have several folders, _img1, _img2 etc.
Then I want to use the find command to find part of an image name, such as:
the string ”modern”
which is (at least) in:
”_img2/modern_world2PS220.jpg”
Also I want to know _in which folder_ it... (10 Replies)
Is there a script or extension that I can look into that will re-size an allotment of images to a given size?? Id like to take images of a certain size and resize them but Im dont remember an install option that can do it if installed in ubuntu but I, also unsure in what code I will have to learn.... (2 Replies)
Hi,
I have a directory with Multiple subdirectories and 1000s of pictures (jpg) in each directory. The problem is that each directory has a 001.jpg in them. I want to append a unique name (the directory_name)would be fine. and then move them to one main backup directory once they have been... (1 Reply)
Hi,
I"m trying to achieve the following:
I have a NAS which holds all my pictures, and have it mounted on my xbmc as a network share. I want to automatically synchronize my pictures (NAS -> xbmc, one direction).
But, during the synchronization I want to resize the pictures to make them... (7 Replies)
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
I am writing a program to display a database to the screen(xterm) and want to allow the window resize signal to increase/decrease the amount data that is displayed. I have a signal handler function for catching the SIGWINCH event and calling a function to reallocate the space for the windows... (0 Replies)