![]() ![]() It’s hard to walk by the images without striking a pose myself. Above, PREFIX is the default install path, typically c:Program FilesImageMagick-7.1.1. I have these yoga screensaver images running on an old 27” iMac in what is currently a very large kitchen, and I find that constantly seeing the images is an inspiration for my practice. Over the last few days I’ve downloaded a lot of yoga images that I now use as screensaver images, so as one example, I start with an image like this:Īnd then add a black border to make the resulting image look like this:Īdding a large border to the image makes it work better with the Mac OS X “Ken Burns” screensaver. On Linux systems use whatever package manager you normally use, i.e., apt-get, yum, or whatever. On a Mac OS X system you can use Brew or MacPorts to install it. The convert command comes from ImageMagick, so you need to have it installed. I put the code shown in a file named convertall.sh, then ran that script like this: It took me ten minutes to figure that out. ![]() Note: When you specify the border color, the -bordercolor option needs to come before the -border option. I guess I should note that it doesn’t actually convert each file it makes a copy of the file with the prefix “ mod_” prepended to the name, so an image named foo.jpg is used as input and copied to a new image named mod_foo.jpg, and this new image has the 20% black border.Īll of my images are different sizes, so I used a “percentage” value for the border size. The script uses the ImageMagick convert command inside a Unix for loop to convert every file. Thanks to everyone, you’ve been too much helpfull.I just used this ImageMagick code in a Unix shell script to add a 20% black border to every image in the current directory:Ĭonvert $i -bordercolor black -border 20%x20% $name Addendum to Ian Cos 'Steps to Install ImageMagick for Windows' specifically for Uniform Server Z and how to fix if you get an empty list of ImageMagick supported formats): Thanks to Ian Cos comments above for setting me in the right direction. The resulting images will have the same name but with jpg extension and they will be placed in the same directory as pdf files. I belive that for some odd reason, applescript isn’t using the ‘codec’ from Ghostscript (thats the GS?), so it cannot read nor write EPSs… but why?Īnd, more important, how do i make applescript to read and write EPSs? Unfortunately there is no GUI for ImageMagic but you can use script below, just save it in pdf2jpg.vbs to run the script just drag all pdf files that you want to convert on script icon. Set the error_text to "Error: " & the error_number & ". On error the error_message number the error_number Set original to POSIX path of source_fileĭo shell script "/sw/bin/convert " & original & " -resize 400x400 -colorspace RGB " & pwg & " & /sw/bin/convert " & pwg & " -resize 120x120 " & tn Set the tn_path to ((tn_folder as string) & "tn_" & file_name) as string Set the pwg_path to ((pwg_folder as string) & file_name) as string this is the processing part of the code: on process_files(source_file, file_name, pwg_folder, tn_folder) I typed the exact string in the script in the Terminal, and the Terminal processes the images without a problem.Ĭonvert: no decode delegate for this image format `/files/EPSi.eps’. but when applescript does de “do shell script” it cannot process EPS (nor illustrator, nor photoshop)… It can read and write over 200 image file formats. This works properly when the command is run. ImageMagick is a free and open-source software suite for displaying, converting, and editing raster image and vector image files. When i was messing around in the Terminal, trying to understand how to tell Imagemagick to resize and everything, it could process any kind of file i wanted. Image files should be converted according to command settings and have its original name with the suffix 1. I’m on MacOSx 10.4.7, with the latest versions of Imagemagick and Ghostscript (acording to fink). It waits when it needs to, it renames the files if they are already in use, it keeps a log of errors, and does the resizing beautifully, but… ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |