Automated Cropping

SH
Posted By
Simon_Hitchcock
Oct 20, 2005
Views
515
Replies
19
Status
Closed
Hi
Im having trouble trying to write a macro. Basically i have to crop dvd sleeves down just to show the front cover. the source files i have are mixed, ie some are just the front cover but theres also some which has the spine and back cover.
Is there anyway to automate the process or am i going to have to manually crop them? Thanks

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

TD
Thee_DarkOverLord
Oct 20, 2005
Creat an action. then use this action in a batch process
SH
Simon_Hitchcock
Oct 20, 2005
Ive tried this, my problem is that not all the source images are the same size. Ive tried setting an action where it crops the image, but i come across a few problems.
I initially set up an action that took an image which had the back/spine/front cover and cropped it down to just show the front cover, this works fine untill it comes across and image that is already just the front cover, then it will cut it half.
the only constant i have is that the height is always ok, ive tried using an aspect ratio such as height =100% width= 50% but again when it comes across an image that is already just the front cover it will cut it in half.
im begining to think im asking for the impossible?
TD
Thee_DarkOverLord
Oct 20, 2005
so seperate your files into back/spine/front and front cover only, and create a action for each one.
SH
Simon_Hitchcock
Oct 20, 2005
ok ill try to explain a bit better.
When i record the action i use the marquee tool on fixed ratio to select what i want to crop (from the top right hand corner to the bottom, this is a constant on all the images ill be using the batch on) which is fine. Problem is the action will record this in mm and not as a percentage, so the action reads:
To:rectangle/Top:0mm/bottom:188mm/right:272mm
But for my action to work as i need it it needs to be in a percentage hope this makes sense? 🙂
M
Marcel
Oct 20, 2005
wrote in message
Ive tried this, my problem is that not all the source images are the same
size. Ive tried setting an action where it crops the image, but i come across a few problems.
I initially set up an action that took an image which had the
back/spine/front cover and cropped it down to just show the front cover, this works fine untill it comes across and image that is already just the front cover, then it will cut it half.
the only constant i have is that the height is always ok, ive tried using
an aspect ratio such as height =100% width= 50% but again when it comes across an image that is already just the front cover it will cut it in half.
im begining to think im asking for the impossible?

Simon,
Even if all images were the same size, I doubt that you’d want to crop them the same way. Some may have too much background. Others, too much foreground. You might decide to crop out an undesirable trash bin on the extreme left or whatever else on the right…
My 2 cents,
Marcel
SH
Simon_Hitchcock
Oct 20, 2005
"so seperate your files into back/spine/front and front cover only, and create a action for each one."

yep this makes sense but i have about 20,000 to sort so if 1 macro is at all possible it would make sense, if its not acheivable then yes a manual intervention will have to happen, and hopefully ill not get given that job to do! 🙂
TD
Thee_DarkOverLord
Oct 20, 2005
ok i think i get it, but im not sure how to do this, maybe using a crop tool preset would be the way to go?
SH
Simon_Hitchcock
Oct 20, 2005
Good idea but i dont think you can set crop presets by percentage tho?
TD
Thee_DarkOverLord
Oct 20, 2005
would it work in your action to resize the image, so then it wouldnt have to be percentage ? it doesnt matter that you would be re-sizing an image to the size it already is, but this would help on cropping the right area of the image that is the wrong size
C
chrisjbirchall
Oct 20, 2005
but i have about 20,000 to sort

Aye, Jim lad!
SH
Simon_Hitchcock
Oct 20, 2005
hmm, thats a good idea!!!!
ill have a go and get back to you!! 🙂
SH
Simon_Hitchcock
Oct 20, 2005
yep that worked a treat!!
Thank you very much Thee_DarkOverLord for your lateral thinking!!! 🙂
L
longuriata
Oct 20, 2005
wrote in message
Hi
Im having trouble trying to write a macro. Basically i have to crop dvd sleeves down just to show the front cover. the source files i have are mixed, ie some are just the front cover but theres also some which has the spine and back cover.
Is there anyway to automate the process or am i going to have to manually crop them?
Thanks

Hire someone.
TD
Thee_DarkOverLord
Oct 20, 2005
no problem, glad i could help.
Y
YrbkMgr
Oct 20, 2005
Problem is the action will record this in mm and not as a percentage, so the action reads: To:rectangle/Top:0mm/bottom:188mm/right:272mm

If you set your ruler in percent before recording the action, it will record the percentages, not the absolute measurements.
TD
Thee_DarkOverLord
Oct 20, 2005
would this work once you have turnd your measurements back to mm ?
Y
YrbkMgr
Oct 20, 2005
Yes. The action will record percentages when you inpsect the action steps.

I use this technique to select the entire image and then contract by 5%. It is also useful for placing items like copyright logos and such by using 1% away from edge, etc.
EZ
Earl_Zubkoff
Oct 22, 2005
You can also crop using the Canvas Size command, which makes it easy to start from the top right and works in percent or mm.
Y
YrbkMgr
Oct 22, 2005
Earl’s right. I use that every day.

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections