So I received approximately 70 or so images from a customer and apparently they were all scanned. They are 4x6 prints but each one has a white background the size of a paper. How can I get rid of them en mass?
-
Are the actual rectangular prints in close to the same position on each image?– RyanMay 2, 2017 at 19:47
-
The original title before edit of this question was: "Isolating images from white background" - Which I thought was clearer than the new version, and implied cropping.– mayersdesignMay 3, 2017 at 8:46
-
Hi Nemy, could you clarify... do you want to crop the images to remove the paper that they were scanned on or do you want to make the white background transparent?– CaiMay 3, 2017 at 12:47
4 Answers
This is a job for the actions palette!
Make a new action for "Auto Crop"
- Open Actions palette (Alt+F9)
- Hit the "create new action" icon bottom right (paper with folded corner)
- Name the action "Auto crop" (for example)
- Go to Image > Trim > "Top left pixel color" (make sure all four boxes are ticked) > OK
- Save as (Shift+Ctrl+S) (then indicate your output directory)
- Close (Ctrl+W)
- Stop the recording action
Use that new action on a batch
- File > Automate > Batch
- Set "Source" to "Folder" and browse to the folder with the originals
- Set "Output" to your destination folder of choice (I recommend a new folder!)
- OK
...sit back and watch the action :)
It's worth mentioning that if you don't actually want them cropped THAT tightly (to the pixel) you can always add to the action a step to simply increase the canvas size (say) 50 pixels all round after the trim. You can also at that point run Auto-Tone, or anything else you'd like to do.
Once you are into actions and batch automation, there is no going back!
I learned a quick tip about removing white background from an image a while back and I think it will apply here.
Here it is step by step.
- Duplicate the background layer (Ctrl+J) and hide the background.
- Go to the blending options by either double clicking on the layer or right click > Blending Options.
- Under the Blending Options > Blend If > This Layer, drag the handle on the white side while pressing ALT key to remove the white background layer.
Just a quick and easy way to remove white background from any image. Look at the screenshot for reference.
Make an action out of this and you can batch process all of your images.
I had this same question. I found that Photoshop CC 2015 (and probably other versions too) has a feature called "Automate > Crop and Straighten Photos".
Preparation
- Read all instructions beforehand so that none of them surprise you.
- Before you start, since these commands will be destructive to your image files (in the sense that you won't be able to "undo" the changes), it's best to create a separate backup folder of your images. Then, for the following steps, use your 2nd copy of the folder of images.
Make a new action
- Open a photo that has unwanted white space around it.
- Open Actions palette (Alt+F9)
- Hit the "create new action" icon bottom right (paper with folded corner)
- Name the action "Crop and Straighten Photos" (or whatever you want)
- Go to File > Automate > "Crop and Straighten Photos"
- Optionally repeat that step 1 or more times if you feel that that the first pass of the "Crop and Straighten" process doesn't tend to be enough for your particular photos.
- E.g., if your images are scans of Polaroids, the first pass of "Crop and Straighten" might remove the whiteness of the scanner lid, and a 2nd pass might be necessary to remove the white border of the Polaroid printout.
- Click the tab of the original image.
- Layer > New > Layer > OK
- In the Layers panel, click the "Background" layer.
- Click Delete
- Image > Image Size, and set it to 1 pixel wide by 1 pixel high > OK
- Click the tab of the image that was automatically cropped
- Select > All
- Edit > Copy
- Click the tab of the original image.
- Edit > Paste
- Image > Reveal All
- Layer > Flatten Image
- Save (Ctrl+S) > OK
- Close (Ctrl+W) the original image
- Close (Ctrl+W) the other image (and click No to decline to save it)
- Stop the recording action (click the square in the Actions palette).
Use that new action on a batch
- File > Automate > Batch
- "Action" should be set to "Crop and Straighten Photos"
- Set "Source" to "Folder". Click "Choose", and browse to the folder with the originals
- Set "Destination" to "Folder", and click "Choose" to choose your destination folder
- I recommend a new, empty folder, but it probably won't matter since your Action is saving in a way that overwrites the Source files anyway, which is why you should have backed up the original files to a totally separate folder before starting any of this.
- OK
You can use this script to do this in few clicks https://youtu.be/6ICVsi2pWyk
-
2Hi and welcome to GDSE. Please explain the method here instead of linking to another site. One day that link will die and your answer will just be clutter.– WolffMay 16, 2020 at 13:26