Cropping an image

C
Posted By
cpliu
May 9, 2004
Views
804
Replies
8
Status
Closed
I wonder if there is a way to crop an image without visually set the area with marquee tool? It would be nice if the program just eliminate the white area and crop the place with image, or you can set the total pixels for white space and the program would crop the image area + pixels of white space. Can I do that in Photoshop? I have 200 images to crop. It’s getting too much.

Thanks,

cpliu

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

J
john
May 9, 2004
In article , cpliu
wrote:

I wonder if there is a way to crop an image without visually set the area with marquee tool? It would be nice if the program just eliminate the white area and crop the place with image, or you can set the total pixels for white space and the program would crop the image area + pixels of white space. Can I do that in Photoshop? I have 200 images to crop. It’s getting too much.

You can do exactly that and more. To address your first wish, look at Image -> Trim. See the options. Very nice – you can crop/trim by transparent pixels, left-right, etc visible pixels. Experiment and you will see In Image -> Crop tool you can specify a specific height and width.

Back to #1, you can set that feature as a batch and whip through all 200 images in no time at all. See "help" and search for "automate" or "batch".

Trust Photoshop. If you want to do it, there is probably a provision.
C
cpliu
May 9, 2004
(jjs) wrote in
news::

You can do exactly that and more. To address your first wish, look at Image -> Trim. See the options. Very nice – you can crop/trim by transparent pixels, left-right, etc visible pixels. Experiment and you will see In Image -> Crop tool you can specify a specific height and width.

Back to #1, you can set that feature as a batch and whip through all 200 images in no time at all. See "help" and search for "automate" or "batch".

Trust Photoshop. If you want to do it, there is probably a provision.

john, thanks a lot for the quick response. It helps a lot. Seems "Trim" works only with grayscale or color images. Mine are in bitmap. I have to convert them to grayscale (1:1) and convert them back to bitmap after trimming. I assume there wouldn’t be any quality degradation after converting twice.

"Trim" trims all the white pixel leaving no border to the image. I have to manually add space with Canvas size. Is there an automated way, eg. adding 5 pixels to each side of the trimmed image?

Thanks a lot,

cpliu
C
cpliu
May 9, 2004
cpliu wrote in
news::

"Trim" trims all the white pixel leaving no border to the image. I have to manually add space with Canvas size. Is there an automated way, eg. adding 5 pixels to each side of the trimmed image?

Can Action do that by adding .2 to Canvas’s width and height on files of different canvas sizes?

Thanks,

cpliu
J
john
May 9, 2004
In article , cpliu
wrote:

cpliu wrote in
news::

"Trim" trims all the white pixel leaving no border to the image. I have to manually add space with Canvas size. Is there an automated way, eg. adding 5 pixels to each side of the trimmed image?

Can Action do that by adding .2 to Canvas’s width and height on files of different canvas sizes?

I must admit I’m stumped. One would think there would be a syntax to image or cavas size to change the size in the dialog box to "+n" or "-n" units, but I haven’t found it.
M
Martin
May 9, 2004
In article ,
(jjs) wrote:

In article , cpliu
wrote:

cpliu wrote in
news::

"Trim" trims all the white pixel leaving no border to the image. I have to manually add space with Canvas size. Is there an automated way, eg. adding 5 pixels to each side of the trimmed image?

Can Action do that by adding .2 to Canvas’s width and height on files of different canvas sizes?

I must admit I’m stumped. One would think there would be a syntax to image or cavas size to change the size in the dialog box to "+n" or "-n" units, but I haven’t found it.

Use a script.

In AppleScript you could do:

tell application "Adobe Photoshop 7.0"
tell current document
set {x, y} to {width as pixels, height as pixels}
resize canvas width (x + 10) as pixels height (y + 10) as pixels end tell
end tell

Regards


Martin
C
cpliu
May 10, 2004
I must admit I’m stumped. One would think there would be a syntax to image or cavas size to change the size in the dialog box to "+n" or "-n" units, but I haven’t found it.

Use a script.

In AppleScript you could do:

tell application "Adobe Photoshop 7.0"
tell current document
set {x, y} to {width as pixels, height as pixels}
resize canvas width (x + 10) as pixels height (y + 10) as pixels
end tell
end tell

Thanks for the script. Unfortunately, I’m on Windows now. Is there a similar scripting for Photoshop Windows version? Maybe it’s one reason I should dig my old Mac out.

Thanks,

cpliu
C
cpliu
May 10, 2004
I have figured out a way to crop it with white space around the image After trimming:
1) select all
2) save selection
3) make a canvas size that is way bigger than all your images
4) load selection
5) expand selection
6) crop the image

I just tested and it can be batched.

Thanks John for the tip on using trim and Martin for the Applescript tip.

cpliu
J
JJS
May 10, 2004
"cpliu" wrote in message
I have figured out a way to crop it with white space around the image After trimming:
1) select all
2) save selection
3) make a canvas size that is way bigger than all your images
4) load selection
5) expand selection
6) crop the image

I just tested and it can be batched.

I owe you one for that! Thanks much!

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections