Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ImageEvents is adding unwanted dark edge to pictures

I resize JPG images using this command:


scale this_image to size 425


And usually, the resulting image has a dark fuzzy edge, sometimes on all 4 sides, sometimes on 2.


What is causing this edge and can it be avoided? Thanks!

Posted on Mar 10, 2023 9:15 AM

Reply
Question marked as Best reply

Posted on Mar 11, 2023 9:05 PM

I appreciate your response, but ImageEvents is the interfaceless app on the Mac that is used by Applescript to automate the manipulation of images. Using Photo or Preview would not be practical in a scripting situation. And resizing literally hundreds of photos a day manually would not be feasible.


However, I did figure out a solution. ImageEvents resizing without creating a dark fuzzy edge around the result relies on a target size that is an even factor of the original size. So if the original is 600 pixels wide, there is no problem targeting 450 pixels, 300 pixels, 200, 100, 60, 50 etc. It's only a problem if there is a remainder in the math. ie, if the target size results in a fractional pixel width like 425 or 31. So I changed my scripts to work with that in mind.

Similar questions

2 replies
Question marked as Best reply

Mar 11, 2023 9:05 PM in response to Community User

I appreciate your response, but ImageEvents is the interfaceless app on the Mac that is used by Applescript to automate the manipulation of images. Using Photo or Preview would not be practical in a scripting situation. And resizing literally hundreds of photos a day manually would not be feasible.


However, I did figure out a solution. ImageEvents resizing without creating a dark fuzzy edge around the result relies on a target size that is an even factor of the original size. So if the original is 600 pixels wide, there is no problem targeting 450 pixels, 300 pixels, 200, 100, 60, 50 etc. It's only a problem if there is a remainder in the math. ie, if the target size results in a fractional pixel width like 425 or 31. So I changed my scripts to work with that in mind.

Mar 11, 2023 4:53 PM in response to BrooklynScripter

Hello BrooklynScripter,


While we can't assist with resizing images using terminal, this article explains how to resize your photos in the Photos app: Photo editing basics in Photos on Mac - Apple Support


Edit a photo or video
1. In the Photos app  on your Mac, do one of the following:
* Double-click a photo or video thumbnail, then click Edit in the toolbar.
* Select a photo or video thumbnail, then press Return. 
2. Do any of the following:
* Zoom in or out on a photo: Click or drag the Zoom slider.
* Make adjustments: Click Adjust to display the adjustment tools. See Adjust a photo’s light, exposure, and more.
* Apply filters: Click Filters to display filters you can apply to change the look of your photo or video. See Use a filter to change a photo’s look.
* Crop the image: Click Crop to display the options for cropping a photo or video. See Crop and straighten photos.
* Rotate a photo or video: Click the Rotate button  in the toolbar to rotate the image counterclockwise. Continue clicking until you get the orientation you want. Option-click the button to rotate the image clockwise.
* Automatically enhance a photo or video: Click the Auto Enhance button  to have the color and contrast of your photo or video adjusted automatically. To remove the changes, press Command-Z or click Revert to Original. 
3. To stop editing, click Done or press Return. 
While you’re editing a photo or video, you can press the arrow keys to switch to other items.


You can also resize the images using the Preview app. This article shows you how:

Resize, rotate, or flip an image in Preview on Mac - Apple Support



Best Regards.




ImageEvents is adding unwanted dark edge to pictures

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.