+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Help needed on a slightly complicated procedure...

    So once I have an image (780 x 640) I need to re-size it to a 780 x 780 square. I can script that pretty easily.

    Here is where it will get complicated, so I'll explain what I need before saying how I'm going to get it to work.

    With the image, the user should be able to draw a line of a certain width across the image. Now whatever part the line is "filling" in the image will be left alone and the rest of the image will be cropped. In the end, there will be a strip of the original image that has the same dimensions as the "line" the user drew.

    Also the strip has to be perfectly horizontal. So even if the line was drawn on a slanted and it could be even off centered, the strip will "grab" that information from the image and make a strip and rotate it so it is horizontal.

    My idea was to create a layer underneath the image and create a clipping mask on the image layer. This will give me a "line" or strip from the image that I want. Again, I'm sure I can script this part too.

    The part where I'm stuck is: once all I have is this arbitrarily slanted strip with everything else transparent, how to trim it. If I tried ordinary trimming, all it will do is trim it until the sides hit the strip.

    Is there no option in PS to remove all the transparency so that it automatically has to rotate it leaving only pixels that are non-transparent...?

    I hope that made sense. I suck explaining things. So if you need more details, please ask.

  2. #2
    Forum Mod
    Join Date
    Jun 2011
    Location
    Uk
    Posts
    5,620
    Thanks
    85
    Thanked 449 Times in 424 Posts

    Re: Help needed on a slightly complicated procedure...

    ok scripting things is a no go for me what you typed to all I read of it was you want prt of an image enlarged but I am sure that is not what your asking as to resizing something into a different size which by the way I am sure your not asking but at 6 am it is all I am getting lol my suggestion would be to crop the image to the exact part you want then use something like genuine fractals to resize image to your specif size. this plug in will do an excellent at making up pixels that are not there. but then I may have (probably) misunderstood you all together ( probably lol almost guarenteed) i would say let me know if i can be of any more help but I am sue you wont be requiring my services any longer

  3. #3
    Junior Member
    Join Date
    Jun 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Help needed on a slightly complicated procedure...

    Thanks for replying. I think I may have not been clear. I'll walk through the steps again using screenshots.

    So here is an image of 780x640. The resizing of the canvas isn't necessary and I know how to script that so I'll skip that step on here.
    Help needed on a slightly complicated procedure...-1.jpg


    ____
    Next step is to create a layer underneath the image layer. (I can script all of this easily.)
    Help needed on a slightly complicated procedure...-2.jpg


    ____
    Now I can create an arbitrary line (I made it 10 px to make it easy to see what I'm doing. Really it will be 4px or smaller.) on the new layer. (This is where the "user input" is needed. And after done the user will use a short-key to trigger the next step.)
    Help needed on a slightly complicated procedure...-3.jpg


    ____
    The trigger will create a clipping mask on the top image layer. (Now this effectively create a strip, of whatever the user chose from before, from the original image. The different ways the line could be drawn is endless since the clipping mask will always only "choose" what the line goes over the original image. But lets keep using the line that I made for now.)
    Help needed on a slightly complicated procedure...-4.jpg


    ____
    Now this is where I need help. What is a good "one-size-fits-all" solution to take any strip at this point and figure out how to rotate it and cropped (Only the transparent pixels should be cropped) to where in the end you end up with this:
    Help needed on a slightly complicated procedure...-5.jpg



    I hope that helps in understanding what I'm trying to get. Again thanks for the reply.

    -edit
    I don't know why some of the images are showing up and some are links. So please click on the links to see what I'm talking about.
    Last edited by vejito; 06-23-2011 at 05:44 PM.

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.9
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.0
Copyright 2011 Photoshop Gurus Forum. All rights reserved.
All times are GMT -5. The time now is 09:12 AM.
vBulletin Skins