Brickdoctor Posted October 26, 2012 Posted October 26, 2012 Is there anyone who knows if is there a software for mac than can provide batch resize and smart crop? I just noticed this.You can use Preview to do batch resize. Drag to select or hold down Command to select multiple images in Finder or on the desktop. Double-click any of the selected images to open in Preview. In the list of images in Preview's right side panel, hold down Command while clicking to select multiple images. (or use Command+A to select them all) Then use the same procedure you would to resize a single image in Preview. I can provide screenshots if you want them. Quote
Calabar Posted October 26, 2012 Author Posted October 26, 2012 I'm trying to find a way to automatize "crop and resize" functions. What I'd like to obtain is a simple procedure (could be even a "copy a file and double click on it") that take in input the original images from LDD and generate ready thumbnails. For windows I'm working with Irfanview, but it seems I've some problem with transparency. For MAC, I don't know if there is a free software that can achieve this goal. The procedure you listed above don't have a smart crop function, than it is not what I'm looking for. Quote
Gnac Posted November 1, 2012 Posted November 1, 2012 (edited) Probably a long shot, since the setup isn't common, but if you have webserver software installed with PHP and Imagick, this script will process a directory of images by removing empty borders and resizing to a default size, or one specified by a query string (e.g. resize.php?size=256). <?php if (isset ($_GET['size']) && is_int ($_GET['size']) ) { define ('SET_THUMB_SIZE', $_GET['size']); } else { define ('SET_THUMB_SIZE', '512'); } define ('DIR_PREVIEWS', SET_THUMB_SIZE . '/'); // Create output directory if it doesn't exist (will be named according to the value of "SET_THUMB_SIZE" if (!file_exists (DIR_PREVIEWS) ) { mkdir (DIR_PREVIEWS, 0777); } $list = glob ('*.png'); // .jpg can also be processed, simply change from .png $thumb = new imagick (); foreach ($list as $name) { // Skip existing thumbnails, in case the script times out while dealing with hundreds of things, // you can just refresh the page and continue where you left off if (file_exists (DIR_PREVIEWS . $name) ) { continue; } $path = realpath ($name); $thumb -> readimage ($path); $thumb -> trimimage (0); // "Tolerance" for border detection - change this to work even on lossy JPGs $thumb -> setimagepage (0, 0, 0, 0); $thumb -> thumbnailimage (SET_THUMB_SIZE, SET_THUMB_SIZE, true); $thumb -> writeimage (DIR_PREVIEWS . $name); $thumb -> clear (); $thumb -> destroy (); } ?> This has saved me a lot of time and I want you to have it. Edited November 1, 2012 by Gnac Quote
Calabar Posted November 1, 2012 Author Posted November 1, 2012 Thanks, very useful. I already thought to an online solution, but it has a limit: if you have not a line that ensure you a fast upload, the process is very slow. Or do you intend to use it in locale? PS: what do you mean with "trimming non-transparent areas"? Usually the portion of the image that need to be cut out is transparent (transparency obtained using Alpha Layer). Quote
Gnac Posted November 1, 2012 Posted November 1, 2012 (edited) Agh, I described "Trimming non-transparent areas" wrong. It works just as you describe - "trimimage (0)" will trim all horizontal and vertical borders which are transparent (or even a solid colour), leaving just the centre part of the image with all the detail. The zero controls the tolerance, so higher values should work even on JPGs with compression artifacts. The script can be executed online, but yes, I run it on my laptop using a nice local webhost package called XAMPP. Because ImageMagick is a commandline app, it can be used easily with many scripting languages, so perhaps Python or something similar might be easier than setting up a localhost just to use PHP. EDIT: There is an even easier way, and it was right under my nose: ImageMagick includes a commandline tool called "mogrify", which is suited for batch processing. Best of all, it's cross-platform! mogrify -trim -fuzz 0 +repage -thumbnail 256x256 *.png This will do the same trim and resize operations on a directory of files as the PHP script above, BUT it will overwrite the original files. Edited November 1, 2012 by Gnac Quote
Calabar Posted November 1, 2012 Author Posted November 1, 2012 The problem is that create a local webserver is too difficult for the great part of the users. The "ideal" thing would be a simple file that executed inside a directory containing the images will create cropped and resized thumbnails, but I didn't find nothing similar. I'm working with irfanview but unfortunately it seems to be unable to manage alpha channel transparency correctly. If you want to create a complete "step-by-step" guide for your script, I'll post it in the first page. You could sent it to me using private messages. Quote
Calabar Posted January 22, 2013 Author Posted January 22, 2013 Added a little guide that shows how to use ImageMagik to execute batch crop and resize of the images. It is a WIP still, any contribute for MacOS and Linux will be appreciated. Quote
Nachapon Bricks Posted February 16, 2013 Posted February 16, 2013 (edited) I found that with PrintScreen key can snap high quality 32xAA screenshots on Nvidia GTX660M. But the Ctrl+K can not. LDD 32xAA screenshot by Nachapon S., on Flickr LDD high quailty screenshot by Nachapon S., on Flickr Edited February 16, 2013 by bbqqq Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.