|
|
Optimize images for Desktop Background display
Thanks tedw, your code is a lot better written than mine, I picked up a few things.
I want to emphasise that the result of tedw's script is substantially different from the original, in that my script keeps the original images' visible dimensions and pads them to the screen ratio. tedw's version scales images to the screen size, which can cause blockiness when scaling small images. I say for small and large images in one folder, use my script, and for a folder of images larger than the screen, use tedw's (and save some memory). Or perhaps someone would like to combine the two scripts?
Optimize images for Desktop Background display
well, modifying the script is straight-forward. If you don't want scaling at all, comment out or delete the
scale _image by factor _scalingFactor line. Of course, this will mean that images which are larger than the screen size will not be scaled down and may not display correctly. If you're only worried about blockiness, then you can add in a check to keep from scaling up images that are too small. You could do that by adding the following lines after the if statement block in the process_images handler (right before the tell application "Image Events" line):
The 2 is a guess (assuming that images which will be scaled up by a factor of 2 might get blocky). 3 or 4 might work as well; I really haven't experimented to see how much scaling Core Image can handle before blockiness sets in.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|