![]() |
| |||||||
| Software Photoshop, Paintshop Pro, Painter, etc., and all their various plugins. Of course, you can also discuss all other programs, as well. |
| | Thread Tools |
|
#1
| |||
| |||
| How to Select an Exact Width from an Edge? Hi, I want to record an action to prep an image for a canvas. I need to add 3" to the width and height. Can I tell Photoshop in an action to select the top 1.5" all the way across no matter how wide or narrow the image is? I'll use the same technique for the other 3 sides and do Layer > New > Layer via Copy for each side to create the extra margin all around the image for the canvas wrapping. |
|
#2
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? |
|
#3
| |||
| |||
| Re: How to Select an Exact Width from an Edge? Hi, Thanks, but that's not what I need help with. Before increasing the canvas size I need the action to select the top 1.5" of the image all the way across no matter how wide, narrow, tall or short the image is. In the Rectangular Marquee tool I can specify the exact proportion but not the actual size of the selection, especially not fixing one dimension while floating the other. Is there a way to do that? |
|
#4
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? Quote:
|
|
#5
| |||
| |||
| Re: How to Select an Exact Width from an Edge? Please ignore my previous notes, looks like they're pretty confusing. I want an action that will select the top 1.5" strip of any image all the way across the top of the image -- regardless of the image's dimensions (i.e., regardless of how wide/narrow/tall/short that image is). Can that be done in Photoshop CS5 on Windows 7? |
|
#6
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? I can think of several ways to do this. All a bit tricky. First I want to know why this is required, and at what step in the action this is... If the 1,5" you want to select is the same 1,5" you have increased the canvas by, then if your image was on a layer (not "background") then that 1,5 will be transparent so you could select the layer, then invert the selection. So as you see, the surrounding steps in the action, and the purpose of the selection can matter a bit here when finding the best way of doing it Maybe we can see the action? Focusing just on "i have an image. Select the top 1,5" regardless of image size and image ppi". The first thing that comes to mind is to do transform selection, but unfortunately that one only saves in the action using %. So: You could hand-draw a selection from the upper left corner (coordinates 0,0) and 1,5 in high. Transform selection, with the anchor point in the upper left corner, increase width by e.g. 1000% percent. It is now probably way wider than whatever document you have. Then you can intersect that selection with a layer that has the same size as your canvas if you want to "crop" the selection so it doesn't go outside the canvas. I attached an action that does this, but sets it to 2.5 cm (my Photoshop isn't set to inches) – you can replace that step with whatever size you need. |
|
#7
| |||
| |||
| Re: How to Select an Exact Width from an Edge? I should have read all the replies first! Chain had the idea first and I agree with transform selection. Select All, Transform Selection. If you type in 1 in. it will work. See attached. Edit: I should have used 1.5 inch in the example, sorry. |
|
#8
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? I think this works |
|
#9
| |||
| |||
| Re: How to Select an Exact Width from an Edge? Chain, Bill, Chillin, Thanks. The objective is to provide extra image material for a canvas wrap to avoid cropping the core image subject matter. Here is the workflow I'm envisioning:
|
|
#10
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? OK I tried some more 2.5". Last edited by chillin; 09-30-2011 at 04:33 AM. Reason: This action works with only an image size W:30in x H:45in. |
|
#11
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? Hi Robert I posted this here and also on NAPP where you also asked the question. Thanks for the clarification and I think I have a way to do this that will work in an action at any ppi, any image size, and any wood frame size. The action does not allow any arbitrary fill. This action steps below will fill one edge with the mirror of the base image along that edge. You would have to create other actions to put in something else yet this should give you an idea of how to do this. This specific action will be to create that mirror edge on the top side of the image - Make sure original image is not a background layer - Create duplicate image and move to bottom layer and make this layer active - Image > Canvas Size; check relative; X.X inches height; anchor point at bottom (this creates X.X inches of transparent edge at the top) NOTE: you can make this step a manual step to put in whatever you want or create sets of actions with various sizes. - Transform > Scale the duplicate image with anchor point at the top and Vertical Scale set to minus 100% (-100%). This mirrors the duplicate image into the transparent area underneath the original image. That is the end of the sequence for one edge. If you want to continue with other edges, go back to the original image, duplicate it and move it under the original and then follow this same procedure yet focusing on other edges. If you do all four edges you are left with transparency in the four corners per your request to fill those in later. An easy modification could be used to have those filled with the already mirrored tops or sides. Here is an example result after doing all four sides. The original image was 10 inches wide by 5 inches tall and the wrap was set to 1.5 inches per edge. Hope this is useful 1365157_32709715-screenshot.jpg Image complements of Stock Exchange: http://www.sxc.hu/photo/1365157 |
|
#12
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? RobertAsh: Now that you provieded the steps you wanted it is clear that it's better to change the whole procedure rather than work out a good way of selecting 1,5 inches. The better way is to first (with your image as a layer) expand the canvas, then transform(flip) copies of the image into the newly expaned canvas – this is what John suggests as well. No selections required, and it is size independent. I have attached an action that does this – including filling the corners. It will stop to ask you what size you want to expand the image by (5 inches width and height is default; set it to whatever). I made one version that saves each side/corner as a separate layer (for you to study), and one that creates them as a merged layer. At the end, the action crops the image to remove the information outside the canvas. Chillin: As you probably missed in my first post, "transform selection" does NOT work for this as it saves in the action using % (even if you typed in inches). So if you try it on an image that has a different size it will no longer be 2,5 in. Last edited by Chain; 09-30-2011 at 04:08 AM. Reason: Rewrote a couple of sentences for clarity. |
|
#13
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? Quote:
Excellent work Chain, your action works great. Last edited by chillin; 09-30-2011 at 08:51 AM. |
|
#14
| |||
| |||
| Re: How to Select an Exact Width from an Edge? John, Chain, Chillin, Thanks. Much appreciated. I walked through John's steps manually and this approach is very clever I'll try Chain's action this morning, am working on a few images right now that require doing this and let everyone know how it worked. |
|
#15
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? Hi Robert It will be good to hear how it comes out. Leveraging the image in my other post, the corners can be filled a couple ways. - Do the top and bottom edges first (or left and right edges), create a stamp of that and then use the same mirror procedure except using the stamped version to fill in the left and right edges (top and bottom edges) respectively. That would fill in the corners - Another approach would be to create a selection of the 4 transparent corners, expand the selection several pixels, and then do a content aware fill. That is what I did with the image below (leveraging from previous post). I also added a one pixel wide line where the original image was located. The CAF did not do a bad job in this case especially considering it is for the wrap corners IMHO. http://i774.photobucket.com/albums/y...Fincorners.jpg CAF-using-SWF.jpg |
|
#16
| |||
| |||
| Re: How to Select an Exact Width from an Edge? Hi John, Another great idea. CAF should do fine in most cases given the corners will be folded in on themselves anyway. Where CAF doesn't work I can re-do the corner by hand. |
|
#17
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? I can understand using CAF when doing it by hand, but in an action I imagine just flipping the image into the corners will be quicker. Either way the result should be fine since - as you say - the corners will be folded in on themselves anyway. |
|
#18
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? I have used both of Chain's actions & it made me think about efficiency. It is nothing wrong with them, they are perfect for very good computers, but my isn't so good & I looked for ways to speed it up a little. I used a pic: 600 resolution (pix/inch), 20" by 25.37" , 12000x15222 pixels 14mb. The Chain's method 1 took 9 minutes & 44 seconds to complete (including flattening the layers.) Method 2 took 31 minutes & 14 seconds. Every time I purged memory & history to give my old computer a chance. I came out with a third method that took 3 minutes & 25 seconds. Great challenge. Thanks Chain. Last edited by chillin; 10-01-2011 at 07:20 PM. |
|
#19
| ||||
| ||||
| Re: How to Select an Exact Width from an Edge? Whoa, that sure is a high resolution image you've got yourself there! When I made the straight-forwards actions I ran them on a low-resolution image, on a 4 year old Mac Pro with 8 GB RAM, so didn't notice the performance issue. I'm surprised it took that long to run; what is your processor and RAM specs? I ran some tests on a 10000x10000 px image, expanding the canvas by 3000 px: Method 1: 23 s Method 3: 10 s ("edge_fast") (64 bit Win 7, i7 3,07 GHz, 6 GB RAM, restarting PS between each test) I had a closer look, and your method was clever in the way it selected just the part of the image needed to be flipped. I see only minor potential for some further optimization (layer-via-copy instead of copy/paste, etc. and it could also be adapted to work with foreign-language versions of Photoshop (name the layers when making them - don't rely on Photoshop's default names). But for now I think it fast enough for our/your use, so I don't think it's worth the extra effort right now. |
|
#20
| |||
| |||
| Re: How to Select an Exact Width from an Edge? Yep, it's fast Way, way faster than doing it by hand!! Also, after importing the action I noticed how much work you two put into that action, it has many steps. It's very humbling to have such great people do so much for you. Any time I can return the favor please let me know. Thanks again, you guys rock! I might just make my exhibition deadline after all Last edited by RobertAsh; 10-03-2011 at 12:37 AM. |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Possible to select all "disparate" pixels? (cs4, M | jane255 | Photoshop Help | 2 | 08-06-2011 04:26 PM |
| Select Masked out object | ylwdog | Photoshop Help | 5 | 03-28-2011 12:27 PM |
| healing brush: how to avoid color bleeding on edge | ronfya | Photo Retouching | 16 | 03-24-2011 07:21 AM |
| Photoshop batch soft edge effect | Galen | Photoshop Help | 3 | 02-12-2011 07:00 PM |
| Torn Paper Edge Effect? | ahutton | Photo-Based Art | 2 | 02-03-2005 08:44 AM |