Copy link to clipboard
Copied
Hello everyone,
I have a trapezoid and i want to turn it to rectangle by using script.
it is basically something like this:
BEFORE
AFTER
i need to find the width of the small side of the trapezoid, in our case it's 2043px:
and after the transform the other side will be 2043 as well:
any ideas?
Copy link to clipboard
Copied
r-bin​ I've noticed we solved these two issues in this thread:
1. Straightening Trapezoid
example:
BEFORE
AFTER
2. Straightens any quadrangle to rectangle
example:
BEFORE
AFTER
How can I solve my initial problem which is turning trapezoid to rectangle but keeping on original X1 and X2
(X1 and X2 being the coordinates of the top side of the trapezoid)
BEFORE
AFTER
any help?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
it worked always helpful.
why "All this is unnecessary nonsense." though?
Copy link to clipboard
Copied
r-bin​ i may need your help another time.
We solved these issues in this thread:
1. Straightening Trapezoid
2. Straightening any quadrangle to rectangle
3. Make Rectangle from Trapezoid
I need help with straightening only the bottom
example:
BEFORE
AFTER
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Awesome as always
to your remark, it doesn't have to be perfect, but it does the trick. I made a script myself that does something close to this:
as the canvas is cropped to the layer, I loop through last row and find the first non white pixel then I rotate it until it is straight. Your jsxbin is way faster.
I really want to understand the "this is all nonsense" because you wrote it 3 times.
i also didn't understand what is "fully automatic mode", is this a mode? haha
Copy link to clipboard
Copied
I really want to understand the "this is all nonsense" because you wrote it 3 times.
i also didn't understand what is "fully automatic mode", is this a mode? haha
Well, you finally understand?
Copy link to clipboard
Copied
You the only one who would know that !
Copy link to clipboard
Copied
r-bin​ sorry to bring up this jsxbin thread from the dead. but i want your advise on couple of them.
You shared these jsxbins:
straightens any quadrangle to rectangle.jsx
strai5.jsxbin
I wonder if some of these can straighten based on certain given percent in the next 3 examples, and i'll explain:
1. I have this image
if i use straightens any quadrangle to rectangle.jsx i get:
i want the jsxbin to work on the upper 75%. (and the rest of the layer would follow through):
2. I have this image
if i use straightens any quadrangle to rectangle.jsx i get:
i want the jsxbin to leave out 10% from top and 10% from bottom and work on middle 80%. (and the rest of the layer would follow through):
3. finally i have this image
if i use strai5.jsxbin i get:
i want the jsxbin to somehow find where this line ends.
for the sake of try let's say leave out 30% from the left and 30% from the right and work on middle 40%. (and the rest of the layer would follow through):
that's all
Copy link to clipboard
Copied
r-bin​ i found a way of doing finally haha
Copy link to clipboard
Copied
... but you don't want to share your solution with the others?
Copy link to clipboard
Copied
Oh i didn't think someone else needs it,
What I basically did was:
1. Make the changes to canvas I mentioned above, example: 80% to MIDDLECENTER
2. create a smart object
3. Straighten using r-bin script (bounds of layer have now changed, so the layer is fitted on canvas)
4. edit contents and go back to previous dimensions
5. save and close (it will be a psb file)
6. crop selection
works like a charm
Copy link to clipboard
Copied
Hello I have same problem. I have a trapezoid picture and i want convert it to rectangel, would you please share the solution with me?