Very useful script for lots of items, can also be used for product shots and what not. Was just wondering why you havent added interpolation setting when changing resolution?
New version 4.2 today. See the link in the description to download. Fixed a bug that left a 1 pixel line on bottom or right edge at times. Also fixed when using pixel units for the target size, image was not the right pixels wide and tall. Images are now the correct pixel dimensions. Thank you for your support.
@@JVSd-SG Define "not work properly." An error is displayed? Or the results are not as expected? The script relies on Photoshop feature "Select Subject." Open the problem image. Use Select Subject. That is what the script uses as a reference. If Photoshop can't get an accurate result of Select Subject, then the script can't get an accurate reference from which to base cropping. There is nothing about the script that can change to make it do something Photoshop can't do on its own.
Amazing tool! Thanks for building it. Please add support for setting individual margins for each side e.g. bottom 10px, while all other sides at 100px etc. It would be useful for the times when you don't want the main subject always be in the center. And would allow easy repositioning of the subject around the canvas: e.g. keep the subject a little lower, or a little more to the side etc. etc. Love the preset feature too! I just hope this gets picked up by Adobe, and they implement this by default!!
The free version of the script uses a single value for all margins. The paid version of the script gives the user independent control of all four margins, and adds the option to scale the result when the image does not reach the crop. It also has the option of saving working PSD files if desired. See www.marspremedia.com/software/photoshop/auto-crop-advanced
Thanks for this Awesome Video! i was wondering is there anyway to skip the pop up if you have a set dimension so i could use it in a batch process on open files? thanks again!!
You could put the images to crop into a folder, and in the first section "Process" select folder instead of active image. That does a batch instead of one-by-one. If it is common to need to process only open images, I could add to the Process section a choice for "Open images" but it seems the Folder option should cover this, so I didn't bother. Let me know if an "Open images" option is truly valuable enough for the extra work of altering the script. Thank you for the feedback. All is welcome.
@@wc7 thank you so much for your reply. I don’t think it’s worth being modified because I can just make an action and then assign an F key to it. now what I would like to try is a version of the script where it doesn’t reposition and fill. I’m curious to see the results of the images at least for the work I do. So pretty much select subject > crop according to the boundaries of the subject with the desired margins. But at the end thanks for such an awesome script!
@@wsupercool Yes using an Action is how I run all my scripts, and the ones used often assigned a function key. The rest of your comment got me thinking about the content-aware crop I've used, which is helpful, but it should be the user's choice. So I updated the script to have a checkbox for it. If disabled, the script doesn't add image but still warns in the log file. New version 2.3 on my website. Download that and see how it works. Thanks for the feedback, it really helps.
Great script! I'm wondering how I could go about applying the script to a folder and all of its subfolders in one batch process. I don't see it it as an option in the script UI but maybe I missed it or if not, perhaps there is a work around? In my case just overwriting the existing files in their place would be fine.
The script didn't have the subfolder option to begin with because by default, the output folder is created below the input folder. But I realize that's not a good reason to omit the option, and the solution isn't difficult -- if the default isn't changed, and the output is below the input folder, simply ignore the output folder when reading files to process. That's what I've done, and now the option to process subfolders is added. The web page is updated with new version 2.4 of the script. Download and give that a try. Let me know any problems. Thank you for your input. It makes the script better.
Wow that was quick, much appreciated. I tried it out and there don't seem to be any problems. So if 'm not missing anything, right now it's now taking the input folder (and subfolders if checked) and outputting all of the processed files to a single output folder. In my specific case (cropping thousands of product shots for a website), I have a bunch of folders, where many of them have additional sub-folder "trees" and I need to keep the whole folder structure (and file names) unchanged. For this it would be super helpful to either be able to just overwrite the files at the same locations that they currently are in, or alternatively, have a "cropped" folder created in the "root" output folder that mirrors the folder structure of the input folder and it's subfolders. I have no idea how difficult this would be to implement but I do imagine that my case is not all that unique and that this functionality could be a useful addition to the script. What do you think?
@@littleLight69 Yes again the script hadn't evolved that far yet, only because it originally was designed to handle a single folder, not subfolders. What you describe is how Batch Multi Save works, so not a big deal to use the same code. I've posted an updated version 2.5 to the web page. Download and try that. Thanks.
Awesome! I left it overnight to process around 5000 images and PS crashed half way through, the next day I finished the other half. I doubt the crash was the scripts fault, it seems to be very stable and work very well. I'll check back if I run into any problems or have more ideas for it. Thanks again for the script and for helping out with the requests. Let me know if theres anything I can do to help you out.
@@littleLight69 Wow, 5000 images. I aimed to provide batching, but didn't imagine anyone would do that many in one go. Glad to hear it's working under duress. As for the overnight crash, my guess is a memory leak. Adobe probably didn't imagine either, that a script would attempt a task that ambitious. So likely it exceeded a resource limit somewhere, that no one expected to be reached.
hey thanks for this! I wonder, since Generative Fill has now been released, could this script leverage that for instances where the margin is too large?
In most cases there shouldn't be any white around the image, unless it's already cropped very tight. But even so, try enabling the option "Use Content-Aware fill...", and see if that is any better. Or if there is too much image around the subject, reduce the minimum margin value. I might need to see an example of the result you're getting. You can contact me on my website www.marspremedia.com/contact/ and I'll reply with an email address you can send a screen capture.
I think I know the issue now, it's the Minimum margin, it was set to high number, i have a question though, how can I load the script as an Action like in your videos?
@@NameIsSakr See video "Photoshop Scripts How-to". Mac instructions th-cam.com/video/b_kCiXFTNGk/w-d-xo.html, Windows instructions th-cam.com/video/ZVYiXP7h6Rw/w-d-xo.html
You have to create an action to run it. See these videos for instructions: macOS: th-cam.com/video/b_kCiXFTNGk/w-d-xo.html Windows: th-cam.com/video/ZVYiXP7h6Rw/w-d-xo.html
After testing this I am assuming there is no way to modify this script to put the subject right of center? I am working on 700 kids that all have the same prop to photo side left. center cropping can't be used in this situation.
Anything about the script can be modified. I usually don't want to change the published script, but I can make other custom versions based on it. If it turns out to be a useful feature, I sometimes add more options to the existing script, or just make another script altogether, related to the original. I'll need specifics of what you want it to do, and some sample images to test with. Contact me through my website and we can discuss further: www.marspremedia.com/contact/
@@lheybriones7592 Good to hear. I was going to say reduce the margin. I am open to suggestions of how the interface might make this clearer. Is it confusing? Maybe not and changes wouldn't make it better, but it never hurts to ask. I'm always listening to user's ideas of how to make scripts better. Thanks.
Because it is free, this script is basic. I have another script with that feature, and more. "Auto Crop People" www.marspremedia.com/software/photoshop/auto-crop-people Also, I have another script that centers the subject's head. "Crop Center Head" www.marspremedia.com/software/photoshop/crop-center-head Here is a complete list of my cropping scripts as of today: www.marspremedia.com/software/photoshop/auto-crop-advanced www.marspremedia.com/software/photoshop/auto-crop-people www.marspremedia.com/software/photoshop/batch-size-and-mask www.marspremedia.com/software/photoshop/crop-center-head www.marspremedia.com/software/photoshop/crop-to-margins www.marspremedia.com/software/photoshop/crop-to-template
In the resolution section, set to "Resample" and enter 300. If you just want to change a folder of images from 72 to 300 ppi, without resampling, use the script Batch Multi Save, and for resolution enter 300, and the option "Set" (as opposed to "Resample"). This script crops to specified dimensions, and allows pixels as-is or resampled. If this doesn't answer the question, I'll need more specifics of what you're trying to achieve.
@wc7 I have problem with script "Crop to template". I've created actions - method 3 - and it's working well for script "Add guidelines". But when I'm creating with the same method for others script (example crop to template) there is error "Photoshop couldn't find Javascript File". I didn't change location of JS file. Please help me!
@@wc7 the same issue. Straight after creating new action - it works. After restart PS, same error (I have open template.psd also). Also batch croping to template through Bridge doesn't work - Bridge -> Tools -> Photoshop -> Image procesor -> rung with action
@@przemoem6834 I can't say why the Action doesn't work. Put the script somewhere else, like in your user folder. Make a folder "Scripts" and put it there under the user account alongside Documents, Downloads, etc. I have no other suggestions for that. The script was not made to work with Bridge. It works in Photoshop. No telling what it will do in Bridge. Don't use it there.
@@wc7 I am creating a script. I need a code to change the Photoshop image from the corp tool to 72 Dpi instead of 300 Dip to 300 pixels. Would you help me?
@@nirphotoartjaiminbhavsar6782 Sure. In script, cropping isn't done with any tool. It's a matter of manipulating the document properties or calling methods on the document. To change resolution without resampling, use app.activeDocument.resizeImage(null, null, 300, ResampleMethod.NONE); That "sets" (as opposed to resamples) the image resolution to 300 pixels/inch. If instead you want to resample, the last argument would change, for example, to ResampleMethod.BICUBICSHARPER (one example... there is AUTOMATIC, BICUBIC, others, just like in the image size dialog). Do your cropping, then change the resolution to what you want. Does that help?
The free script doesn't support transparency. Any of the paid cropping scripts keep transparent backgrounds. www.marspremedia.com/software/photoshop/auto-crop-advanced www.marspremedia.com/software/photoshop/auto-crop-people www.marspremedia.com/software/photoshop/crop-center-head www.marspremedia.com/software/photoshop/crop-to-margins www.marspremedia.com/software/photoshop/crop-to-template
Hi william, I want to crop 1786 photos. The subject selection feature for 1 photo works without any problems. But I have a problem when I want to crop multiple photos. It crops 1 photo without any problem, it does not crop the other photos. Can yo help me?
The script depends on Photoshop's Select Subject feature to work. If Photoshop does well at finding the subject, the script works. For photos that are difficult to find the subject, the script doesn't crop accurately. In cases of photos with subjects difficult to identify, this script is not going to help.
I am exploring face detection but anything I create with advanced features like that won't be a free script. Just so you know. When I come up with something that works, I'll post a reply. Thank you for the feedback.
Very useful script for lots of items, can also be used for product shots and what not.
Was just wondering why you havent added interpolation setting when changing resolution?
New version 4.2 today. See the link in the description to download. Fixed a bug that left a 1 pixel line on bottom or right edge at times. Also fixed when using pixel units for the target size, image was not the right pixels wide and tall. Images are now the correct pixel dimensions. Thank you for your support.
CC 2019 not work properly, may be because photos with items on background
@@JVSd-SG Define "not work properly." An error is displayed? Or the results are not as expected? The script relies on Photoshop feature "Select Subject." Open the problem image. Use Select Subject. That is what the script uses as a reference. If Photoshop can't get an accurate result of Select Subject, then the script can't get an accurate reference from which to base cropping. There is nothing about the script that can change to make it do something Photoshop can't do on its own.
Amazing tool! Thanks for building it. Please add support for setting individual margins for each side e.g. bottom 10px, while all other sides at 100px etc.
It would be useful for the times when you don't want the main subject always be in the center. And would allow easy repositioning of the subject around the canvas: e.g. keep the subject a little lower, or a little more to the side etc. etc.
Love the preset feature too!
I just hope this gets picked up by Adobe, and they implement this by default!!
The free version of the script uses a single value for all margins. The paid version of the script gives the user independent control of all four margins, and adds the option to scale the result when the image does not reach the crop. It also has the option of saving working PSD files if desired. See www.marspremedia.com/software/photoshop/auto-crop-advanced
Works like a charm. Thanks for your sharing of photoshop knowledge
Thanks for this Awesome Video! i was wondering is there anyway to skip the pop up if you have a set dimension so i could use it in a batch process on open files? thanks again!!
You could put the images to crop into a folder, and in the first section "Process" select folder instead of active image. That does a batch instead of one-by-one. If it is common to need to process only open images, I could add to the Process section a choice for "Open images" but it seems the Folder option should cover this, so I didn't bother. Let me know if an "Open images" option is truly valuable enough for the extra work of altering the script. Thank you for the feedback. All is welcome.
@@wc7 thank you so much for your reply. I don’t think it’s worth being modified because I can just make an action and then assign an F key to it.
now what I would like to try is a version of the script where it doesn’t reposition and fill. I’m curious to see the results of the images at least for the work I do. So pretty much select subject > crop according to the boundaries of the subject with the desired margins. But at the end thanks for such an awesome script!
@@wsupercool Yes using an Action is how I run all my scripts, and the ones used often assigned a function key. The rest of your comment got me thinking about the content-aware crop I've used, which is helpful, but it should be the user's choice. So I updated the script to have a checkbox for it. If disabled, the script doesn't add image but still warns in the log file. New version 2.3 on my website. Download that and see how it works. Thanks for the feedback, it really helps.
Great script!
I'm wondering how I could go about applying the script to a folder and all of its subfolders in one batch process.
I don't see it it as an option in the script UI but maybe I missed it or if not, perhaps there is a work around?
In my case just overwriting the existing files in their place would be fine.
The script didn't have the subfolder option to begin with because by default, the output folder is created below the input folder. But I realize that's not a good reason to omit the option, and the solution isn't difficult -- if the default isn't changed, and the output is below the input folder, simply ignore the output folder when reading files to process. That's what I've done, and now the option to process subfolders is added. The web page is updated with new version 2.4 of the script. Download and give that a try. Let me know any problems. Thank you for your input. It makes the script better.
Wow that was quick, much appreciated.
I tried it out and there don't seem to be any problems.
So if 'm not missing anything, right now it's now taking the input folder (and subfolders if checked) and outputting all of the processed files to a single output folder. In my specific case (cropping thousands of product shots for a website), I have a bunch of folders, where many of them have additional sub-folder "trees" and I need to keep the whole folder structure (and file names) unchanged. For this it would be super helpful to either be able to just overwrite the files at the same locations that they currently are in, or alternatively, have a "cropped" folder created in the "root" output folder that mirrors the folder structure of the input folder and it's subfolders.
I have no idea how difficult this would be to implement but I do imagine that my case is not all that unique and that this functionality could be a useful addition to the script. What do you think?
@@littleLight69 Yes again the script hadn't evolved that far yet, only because it originally was designed to handle a single folder, not subfolders. What you describe is how Batch Multi Save works, so not a big deal to use the same code. I've posted an updated version 2.5 to the web page. Download and try that. Thanks.
Awesome!
I left it overnight to process around 5000 images and PS crashed half way through, the next day I finished the other half.
I doubt the crash was the scripts fault, it seems to be very stable and work very well. I'll check back if I run into any problems or have more ideas for it.
Thanks again for the script and for helping out with the requests. Let me know if theres anything I can do to help you out.
@@littleLight69 Wow, 5000 images. I aimed to provide batching, but didn't imagine anyone would do that many in one go. Glad to hear it's working under duress. As for the overnight crash, my guess is a memory leak. Adobe probably didn't imagine either, that a script would attempt a task that ambitious. So likely it exceeded a resource limit somewhere, that no one expected to be reached.
hey thanks for this! I wonder, since Generative Fill has now been released, could this script leverage that for instances where the margin is too large?
@@leevfx no sorry this script won’t do that
@@wc7 I know it won't right now...but could it in future? I would pay for this if it existed
Love it, but is there's a way to make just put the subject in the middle without adding the white area around it?
In most cases there shouldn't be any white around the image, unless it's already cropped very tight. But even so, try enabling the option "Use Content-Aware fill...", and see if that is any better. Or if there is too much image around the subject, reduce the minimum margin value. I might need to see an example of the result you're getting. You can contact me on my website www.marspremedia.com/contact/ and I'll reply with an email address you can send a screen capture.
@@wc7 Contect Aware takes too long to finish, the images are cropped in Camera and on space on top, only down under the shoes.
I think I know the issue now, it's the Minimum margin, it was set to high number, i have a question though, how can I load the script as an Action like in your videos?
@@NameIsSakr Reduce the minimum margin is the only other choice. I see your other reply. Looks like you realized the same.
@@NameIsSakr See video "Photoshop Scripts How-to". Mac instructions th-cam.com/video/b_kCiXFTNGk/w-d-xo.html, Windows instructions th-cam.com/video/ZVYiXP7h6Rw/w-d-xo.html
Hi thank you for the great video, but please I didn't find Auto crop in the Action section?
You have to create an action to run it. See these videos for instructions:
macOS: th-cam.com/video/b_kCiXFTNGk/w-d-xo.html
Windows: th-cam.com/video/ZVYiXP7h6Rw/w-d-xo.html
After testing this I am assuming there is no way to modify this script to put the subject right of center? I am working on 700 kids that all have the same prop to photo side left. center cropping can't be used in this situation.
Anything about the script can be modified. I usually don't want to change the published script, but I can make other custom versions based on it. If it turns out to be a useful feature, I sometimes add more options to the existing script, or just make another script altogether, related to the original. I'll need specifics of what you want it to do, and some sample images to test with. Contact me through my website and we can discuss further: www.marspremedia.com/contact/
Woah this is super handy, thank you!
Thank you. I'm glad you like it.
How can this run automatically each time without asking for the settings?
plz tell how to make auto crop action in last video u told only about scripts and how to apply it
Download the script and create an action to run it. See this video, method #3: th-cam.com/video/ZVYiXP7h6Rw/w-d-xo.html
hi william, how to make them just centered? no content aware, I just want my model to get in the center., filling in white will do for the corners.
ohh nevermind, I figured it out! Thanks William! this is really a HUGE help! Subscribed!
@@lheybriones7592 Good to hear. I was going to say reduce the margin. I am open to suggestions of how the interface might make this clearer. Is it confusing? Maybe not and changes wouldn't make it better, but it never hurts to ask. I'm always listening to user's ideas of how to make scripts better. Thanks.
Works fabulously. Thanks a ton !!!
Great. Thanks for watching.
Thank for knowledge useful
I want to auto crop white or black borders or side borders
Please elaborate. The images have borders now? That you want to crop away? Or you want to add borders to the result?
How about detecting the eyes and thats the reference to crop and position the subject in the center?
Because it is free, this script is basic. I have another script with that feature, and more.
"Auto Crop People"
www.marspremedia.com/software/photoshop/auto-crop-people
Also, I have another script that centers the subject's head.
"Crop Center Head"
www.marspremedia.com/software/photoshop/crop-center-head
Here is a complete list of my cropping scripts as of today:
www.marspremedia.com/software/photoshop/auto-crop-advanced
www.marspremedia.com/software/photoshop/auto-crop-people
www.marspremedia.com/software/photoshop/batch-size-and-mask
www.marspremedia.com/software/photoshop/crop-center-head
www.marspremedia.com/software/photoshop/crop-to-margins
www.marspremedia.com/software/photoshop/crop-to-template
you are amazing!
Thank you. I'm glad the script is helpful.
i dont have auto crop action in my photoshop 2021
Download the script and create an action to run it. See this video, method #3: th-cam.com/video/ZVYiXP7h6Rw/w-d-xo.html
How to crop Without pixel changes 72 DPI to 300 DPI
In the resolution section, set to "Resample" and enter 300. If you just want to change a folder of images from 72 to 300 ppi, without resampling, use the script Batch Multi Save, and for resolution enter 300, and the option "Set" (as opposed to "Resample"). This script crops to specified dimensions, and allows pixels as-is or resampled. If this doesn't answer the question, I'll need more specifics of what you're trying to achieve.
Fabulous!
Thank you
@wc7 I have problem with script "Crop to template". I've created actions - method 3 - and it's working well for script "Add guidelines". But when I'm creating with the same method for others script (example crop to template) there is error "Photoshop couldn't find Javascript File". I didn't change location of JS file. Please help me!
Delete the Action and record it again.
@@wc7 the same issue. Straight after creating new action - it works. After restart PS, same error (I have open template.psd also). Also batch croping to template through Bridge doesn't work - Bridge -> Tools -> Photoshop -> Image procesor -> rung with action
@@przemoem6834 I can't say why the Action doesn't work. Put the script somewhere else, like in your user folder. Make a folder "Scripts" and put it there under the user account alongside Documents, Downloads, etc. I have no other suggestions for that. The script was not made to work with Bridge. It works in Photoshop. No telling what it will do in Bridge. Don't use it there.
I want to add code to utilize generative fill instead of content aware, will I be able to edit the source code if I buy it?
No. Other scripts are open source but not this one.
how to 72 Dpi random size image only crop and convert image to 300 Dpi
I assume this is the same question repeated. See my last reply. If I'm not understanding correctly, say more.
@@wc7 I am creating a script. I need a code to change the Photoshop image from the corp tool to 72 Dpi instead of 300 Dip to 300 pixels. Would you help me?
@@nirphotoartjaiminbhavsar6782 Sure. In script, cropping isn't done with any tool. It's a matter of manipulating the document properties or calling methods on the document. To change resolution without resampling, use app.activeDocument.resizeImage(null, null, 300, ResampleMethod.NONE); That "sets" (as opposed to resamples) the image resolution to 300 pixels/inch. If instead you want to resample, the last argument would change, for example, to ResampleMethod.BICUBICSHARPER (one example... there is AUTOMATIC, BICUBIC, others, just like in the image size dialog). Do your cropping, then change the resolution to what you want. Does that help?
If the image has a transparent background, how do I keep it?
The free script doesn't support transparency.
Any of the paid cropping scripts keep transparent backgrounds.
www.marspremedia.com/software/photoshop/auto-crop-advanced
www.marspremedia.com/software/photoshop/auto-crop-people
www.marspremedia.com/software/photoshop/crop-center-head
www.marspremedia.com/software/photoshop/crop-to-margins
www.marspremedia.com/software/photoshop/crop-to-template
Hi william, I want to crop 1786 photos. The subject selection feature for 1 photo works without any problems. But I have a problem when I want to crop multiple photos. It crops 1 photo without any problem, it does not crop the other photos. Can yo help me?
The script depends on Photoshop's Select Subject feature to work. If Photoshop does well at finding the subject, the script works. For photos that are difficult to find the subject, the script doesn't crop accurately. In cases of photos with subjects difficult to identify, this script is not going to help.
Cooooooollll ❤
Hi sir can you see me how to create a image crop actions
You mean add an action to run a script?
Windows: th-cam.com/video/ZVYiXP7h6Rw/w-d-xo.html
macOS: th-cam.com/video/b_kCiXFTNGk/w-d-xo.html
how can i automatically make an image fit onto adrop zone
I don't know. What is "adrop zone"? I am not familiar. Do you need images to be certain dimensions?
can u please write a script for passport batch cropping script for photoshop like pixnub face crop
I am exploring face detection but anything I create with advanced features like that won't be a free script. Just so you know. When I come up with something that works, I'll post a reply. Thank you for the feedback.