Free transform the image

Hi Forum!,
Im new to scripting. Thanks to forum for sharing the knowledge to entire world..
I have a small request to do with the scripting.
I have grouped all the pageItems.... as G.
and then selected the Group (G),
i have choosen the free transform tool using the command;
app.menuActions.itemByID(45569).invoke(); //to choose free transform tool.
all that i need to do is.. to enlarge the height of group (G) proportionally between top margin and bottom margin.
(which we do it manually by selecting the grouped item holding Shift+Alt key, and dragging untill we reach the desire size).
g = app.activeDocument.allPageItems;
gr = app.activeDocument.groups.add(g);
app.menuActions.itemByID(45569).invoke();
//then i need to increase the height of the group g between top margin and bottom margin.
Can anybody help on this free transformation of the selected group.
please..
Dhinak...

try sthg like:
var g = app.activeDocument.allPageItems;
var gr = app.activeDocument.groups.add(g);
var bgr = gr.geometricBounds;
var hgr = bgr[2]-bgr[0];
var pm= gr.parentPage.marginPreferences;
with(pm)
var t = top;
var b = bottom;
gr.move([bgr[1],t]);
var hn = gr.parentPage.bounds[2] - gr.parentPage.bounds[0] - t - b;
var s = hn / hgr ;
tM = app.transformationMatrices.add({horizontalScaleFactor:s,   verticalScaleFactor:s}); 
           gr .transform(CoordinateSpaces.INNER_COORDINATES,   AnchorPoint.TOP_CENTER_ANCHOR, tM );

Similar Messages

  • Free Transform Vs. Image Size - Quality Impact?

    I'm using Photoshop CS3 and I have a quick query regarding the difference in image quality between resizing an image using 'Image Size' compared to 'Free Transform'.
    I'm laying out several individual photographs on to a page (with some precision) and therefore using the transform function to scale the image to the right size is certainly the quickest and easiest option. However, I have always been keen to ensure maximum image quality and I don't know if this will degrade the image more than resizing the image using 'image size' before pasting it (obviously with a lot more effort involved).
    Any thoughts?

    Many thanks for your replies - that's very useful.
    I should have mentioned that I will always be resizing down. Also, when performing my standard method for resizing (using Image Size) I always stick to the standard Bicubic then follow up with sharpening (specific for my output). What you've told me is great as it means I can simply perform the transform of each image and then an output sharpening on the entire canvas. This should be equivalent to resizing, sharpening and then copy-paste of individual images to the same canvas.
    Using smart objects (which I seldom do at the moment) is an interesting thought, which I'll have to look into. I could copy a smart object from each of my source files, resize and then perform a smart object sharpening to them...
    Many thanks again!

  • Smart object or duplicate layer/ decrease resolution or free transform

    Hi all
    I would appreciate some advice on a few questions I have regarding PS.
    1) I intend to place an image I have been working on into another file in photoshop. To keep file size down and to keep as much quality as possible which is my best option? The options I see available to me are to save the file as a TIFF
    and then duplicate the layer into the new file or to place the image as a smart object. Or is there a better way?
    If I were to place it as a smart object in which format is best? I will not need to work on the original file once it has gone into the new file.
    2) I have a subject matter in a raw file that is quite small and needs to be made larger once in photoshop. I see two options for me. First one is decreasing the resolution from 300 to something like 250 which will make im the subject matter the right size. The second option I see is to free transform the image in photoshop to make it larger.
    I intend to print these files on A4 at a commercial printers.
    Thanks

    As to your question #2:  by all means do any upsampling of the raw file inside Adobe Camera Raw through the ACR workflow options (looks like a link right under the ACR preview window) to the exact dimensions you'll be using.  That'll give you the best quality.
    Downsampling to upsample later is just nuts!
    Re #1:  "To keep file size down and to keep as much quality as possible"  is an oxymoron.  You get either or.
    It's always best to work at the final output size.

  • Layer via Copy, Free Transform, Multiple Layers, Doesnt work?

    Hello,
    I am using Adobe Photoshop CS6, latest version as of 05/25/12
    I have 19 layers, each has a 1200x1200px texture. These are of course overlapped, so setting them all to visible will only show the top layer.
    All layers are rasterized, and contain 1200x1200px:
    1) I select all 19 layers using shift+click, all are highlighted (in the layer pane).
    2) I select a region using the selection tool, in this case a rectangular region that is 172px high and 35px wide.
    3) I right click the selection, and then select: layer via copy. (Note, Layer via cut is disabled for some reason)
    4) *problem* It creates 19 new layers with the full image from the selected layers and not the selection which is what I wanted to place in the new layers.
    5) *problem* when I right click the selection and select "Free Transform", the transform box surrounds the entire canvas and not the selection.
    6) *problem* when I skew, it skews the entire image and not just the selection.
    7) *problem* Previously, I have been able to select a layer from the layer pane, go to image menu, select adjustments, brightness/contrast, and adjust the brightness/contrast for just that layer. Now it wont let me.
    8) *related problem* If I have 3 layers (background, 1, and 2) on a 1200x1200 canvas, with the image in layer 1 being 150px, and the image in layer 2 being 150x, each rasterized, and then stack the images on 1 and 2 over eachother, then select both layers, then select a region inside the stacked images, then select free transform, the free transform selection embodies all pixels inside the canvas (not the entire canvas this time) and performs the transform on these pixels and not the original selection.
    If I do it making all the layers visible as well as selected, it behaves the same.
    What appears to be happening is Photoshop is ignoring the selection and for some reason is using a pixel region (or if pixels cover the entire canvas, the whole image) when performing actions intended for the selection.
    What's strange is when I made these textures, I started out with 19 150x150 pictures, I set the canvas size to 1200x1200, selected all the layers in the layer pane, selected the 150x150 image in the middle, and was able to move all 19 textures to the top right corner, able to switch to transform on all 19 pictures, able to rotate 180 degrees all 19 pictures, was able to flip horizontal all 19 pictures, then able to copy all 19 pictures to new layers, move the 19 pictures all at the same time to the right 150 pixels, rinse and repeat, to eventually come out with 19 1200x1200 textures tiled from the 150px pictures. In other words, I did exactly what I am attempting to do with the 1200x1200 pictures with the 150x150 pixtures and it worked like a champ.
    Something has changed, maybe an option somewhere got clicked, something. I don't know.
    The end goal of course is to take a selection of all 19 of the 1200x1200 pictures, transform, then skew that image to make a collage of images applied to an added background. Performing this on all 19 textures and getting the same exact skew, etc would take days considering I need to do about 15 of different portions of the tile.
    Need some help here... is there an option somewhere that makes photoshop ignore the selection and perform the actions on all the images?
    Best regards,
    Dustin

    Just ran into this problem today Dustin. You can only create new layers via copy from one layer. What I ended up having to do is copy all of my images that were on different layers. Then I merged them. Select all the images you copied>Layer>Merge. So now I have two copies of artwork on the same canvas. One that is all different layers and one that is now one layer.  Then I was able to select the portions of the new merged layer I wanted and create new layers via copy. Then I erased the extra, merged layer.
    You don't have to copy your initial images. I just did in case I wanted to edit them separately later.
    I hope I understood your first problem correctly.

  • "free transform" gives crappy result

    When I have a picture in Flash CS4 and rotate it via 'free transform' the picture gets distorted. When I do the same in Photoshop CS4 the quality stays very good. Of course Flash isn't Photoshop, but I would not expect the result to differ this much.
    Am I doing somethign wrong? Or do I have to live with this?

    This is mere hearsay, as I haven't hd to deal with it myself, and when I rotate an image it doesn't look any worse for wear...  In the library, right click on the image and select Properties.  In the panel that appears, check the allow smoothing option and see if that helps.

  • Missing Free Transform in Motion

    This is a bit difficult to explain but, in Motion I've imported a picture I wish to crop and use for motion tracking. The picture should have, when I import it, circles on the four corners that allow me to free transform the picture. But, for some reason these circles never show up, even when I use stock content that came with Motion. If this is difficult to understand, but you can help, I can send you a screen shot of what I'm talking about. I really need anyone's help with this, I can still transform objects with the inspector but this is extremely time consuming.
    Message was edited by: FranzyPants

    click on the layer you want to transform then hold down shift and hit S.... this is the shortcut to select the transform tool...

  • Opacity and Free Transform bugs

    I just got Photoshop CS5 and there are two things that bug me. The first is a problem with Free Transform that has dated back since Photoshop CS. When I first started out with Photoshop 7.0 and I have both a path and a selection on screen, I can choose to Free Transform the path if I have the Path Selection Tool selected, or Free Transform the selection's content if I have the Move or Marquee tools selected. But since Photoshop CS came out, it will ONLY Free Transform the path if it's on screen, regardless of which tool is selected. This is very annoying, because I usually use paths as a guide when I need to Free Transform something into place. [b]How do I Free Transform pixels if a path is on screen?[/b]
    The second problem seems to be a bug with the Opacity shortcuts. If for example, I want to reduce the opacity of a layer to 50%, I'd press M, 5. But in Photoshop CS5, I have to press M, 5, 5. I have no idea why I need to press 5 twice, but it throws me off. What's causing this and how do I fix it?

    Ah with you now.
    With the selection on screen click on the Move tool. Then check the "Show transform tools"box at the top of the screen. After that transform away...
    I hope this helps
    Dave

  • Free Transform in Illustrator?

    Hi, I have a problem. I can`t find how to free transform in Illustrator like in Photoshop.
    Here is an example: I want to put a letter on all sides of an isometric cube. So I have to free transform the letter without any perspective effect.
    Can someone help me? It seems to be easy to do this but I really can`t find the perfect option.

    thinking about it, envelope distort would probably be easiest for your case:

  • ImageIo: reading and writing a jpeg corrupts the image

    Sometimes, ImageIo manages to read an image wrong. If I simply read() and write() the
    image without any transformations, the image writtten will have its colors all wrong. The
    output image format here doesn't matter.
    An example image is: http://bram.name/~brama/pics/test.jpg
    And output after reading and writing it: http://bram.name/~brama/pics/test_output.jpg
    Is the image io lib to blame, or is it a broken image? The image displays fine in other programs.
    Message was edited by:
    Bram_A

    Use this code to load the image.
    From my experience it is much more stable and also faster.
    My guess is that the problem is related to the ICC profile embeded in the JPEG.
    JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new URL("http://www.stack.nl/~brama/pics/imageio.jpg").openStream());
    BufferedImage image = decoder.decodeAsBufferedImage();

  • All of a sudden the transform tool and free transform tool are grayed out and will not allow me to scale, rotate, or do anything to an image I just scaled?

    I've been using Photoshop for years, but tonight I ran into an issue that I don't understand. I was working with a file that I had been working with for months. I added a new image and resized it to fit as I needed just as I always have (select layer with image > EDIT > TRANSFORM > SCALE.) All was working fine. I added a second image to the file I was working on (I added it by dragging it into the file from another window just as I had added the first image.) However, this time when I tried to select EDIT > TRANSFORM > SCALE this option was not available to me. Only the FREE TRANSFORM PATH or TRANSFORM PATH options were available. When I selected the SCALE in the TRANSFORM PATH menu (just to see what would happen) it started to scale a completely unrelated layer that DID have a path to it. However, the layer of my image was still selected and NOT the layer with the path. This image layer has no path even on it or around it in any way.  I tried to select the folder layer and the same thing happened. It selected this one path and tried to scale it. I selected the layer I just previously scaled and tried to scale it again and it will only allow me to select the transform path option. I selected it to see again what would happen and once again it selected this completely unrelated path on a completely different layer. WHAT?????  This makes absolutely no sense! I have tried restarting both my computer and PS and it won't stop happening! I really need to get this file finished and uploaded to my developer ASAP so I really hope that someone has some insight as to why this is happening.

    hedger,
    How do you expect anyone to help when we don't know a darned thing about the file, abut your setup, exact version of Photoshop and your OS, machine specs, etc.?
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Elements 9 - how to add the grid over "free transform" to twist an image/layer

    Hi Every one!
    Im sure I asked this before, but I cant for the life of me find the post!! I think I must have dreamed it!! (shame I didnt dream the answer lol)
    OK so Im now on photoshop elements 9, Is there a way to properly bend and transform a layer? I USED to for to free transform (control
    +T) then click on a grid at the top of the screen which ment I could bend any part of the picture...
    If I tell you what Im trying to do it might help?
    Im trying to bend a rainbow.. at the moment Ive used the rectangle tool and created a rectangle rainbow, but Id like to bend it into shape, maybe even distort it a little to look like this...
    stbanabaspreschool.vpweb.co.uk/default.html

    Well, I think the best way to create a rainbow would be to use a vector program, but there's a way to use PSE9 to get a rainbow effect that might be useful.
    Create a new image.
    Use the fill tool with a spectrum fill (I used the "Medium" spectrum):
    Create a small, tight circular fill:
    Zoom in to give yourself room to work on it.
    Make a circular selection around the outer edge of the spectrum, invert the selection and delete it:
    Make a small circular selection in the center, delete that; make a rectangular selection covering the bottom half and delete that:
    Select the spectrum and use Layer...New...Layer via Copy to get the spectrum on its own layer with a transparent background.  Then squish the spectrum:
    Rotate the spectrum 90 deg. right and move it to the left of the image area:
    Use Filter...Distort...Shear with these settings to pull the spectrum into an arc:
    Rotate the spectrum back left, and transform it into something useable:
    The layers look like this:
    It ain't perfect, but might be good enough.
    Ken

  • Free Transform multiple layers at the same time (only selected part)

    Hi,
    i have two layers - one contains color and second one contains outline. I want to select a part of the image and free transform both the layers at the same time. (so when i for example move or rotate the selected part of my example, both the color and outline moves at the same time). Layers must stay separated, process must be sort of quick, i would love to use this all the time when drawing etc.
    - Only way i managed to make this somewhat happen was to select the desired part of the image -> save the selection -> new layer via copy (on first layer) -> reselect the saved selection -> new layer via copy (on the second layer) -> select both of the new layers -> free transform. Warp doesnt work but other transforms do. But still this process is too slow and distracting even when having all the required commands hotkeyed. Is there a faster way?
    Any tips are welcome!

    @Trevor.Dennis
    i did understand, but as i said ctrl clicking the new layer only selects visible pixels in it, and my layers dont cover the whole canvas, especially not the outline layer, so ctrl click will only select that noodle of pixels and thats not usable in the other layer. (doing selection in the other layer first isnt a solution)
    Better description of what exactly im after:
    im manually drawing characters and i keep the their black "ink" lines/outlines on separate layer from the color layer. From time to time i want to transform small part of the character, lets say warp or rotate just its leg to fix or iterate, but i want to transform both the outline and color layer at the same time with that rotation so i see realtime how it looks. I would use this all the time if it was doable quickly. Transforms and puppetwarp are so powerful when drawing that as last resort i will have to switch to drawing everything on single layer.

  • Edit  / Free Transform image ( NOT PATH!)

    I would like to do an edit / free transform to resize a layer in my image. I want to do this WHILE LOOKING AT a round path that I have created.
    No problem in photoshop 7 , just turn on the path, select the image layer that I want to resize, edit/free transform and I can shrink the image while looking at the circular path to see how the image fits within the path.
    In CS3, when i try to do an edit / free transform, instead of resizing the image, it wants to RESIZE THE PATH FOR SOME REASON. No, no, no. Leave the path alone. I want to SEE the path, but I do not want to resize the path. I want to resize the image while looking at how it fits within the path.
    The only way that I see to resize the image is to turn off the path so I can no longer see the guide that i am using to determine the final image size / position. Obviously a major malfunction.
    Hopefully, there is an easy workaround out there? Any help appreciated.
    Thanks,
    Mark

    ...and another thing.
    If you use the ctrl HTH workaround mentioned previously in this thread, it doesn't work for the situation where I need it the most.
    I open an existing image with a circular path. I "paste in" an image from an email. What I used to do in photoshop 7 was edit free transform and i could freely shrink the image EVEN THOUGH THE PASTED IMAGE WAS LARGER (OUTSIDE THE BOUNDARIES OF) THE CURRENT IMAGE. The free transform would shrink the image to within the boundaries, then shrink further inside the path as needed. So Charles, you can see that the result of the CRTLHTH would be to size only the visible portion of the pasted image within the path. No, I need to size the WHOLE PASTED IMAGE even if it is outside the boundaries when pasted. Any workarounds appreciated. Maybe a CTRLPQHTH or something like that?
    Thanks,
    Mark

  • Hi. After I have loaded a picture into Photoshop some of the menu tools are greyed out and I cannot use the keyboard short cut, for instance I cannot use Ctrl   T to enter free transform mode. Also the toolbar is so small I cannot see the icons without ge

    Hi. After loading a picture into Photoshop some of the menu tools are greyed out and I cannot use the keyboard short cuts, for instance I cannot use Ctrl + T for free transform, how do I resolve this problem. In addition the tool Icons are so small I have to get close to the screen to see them, is there anyway the Icons can be made bigger without reducing the resolution of the screen.
    Thanks
    Derek

    Are you working on a background layer? If so, Ctrl + T will not work. Press Alt and double-click your background layer to convert to a normal layer (or right-click BG layer and select Layer from Background) and try again.
    If you're working in Photoshop CC 2014 you can go to Preferences > Experimental Features and tick "Scale UI 200% for high-density displays" to make your buttons and icons larger.

  • I use an external hard drive for my Lightroom library and I notice that all the images shown on there are DNG. On my MAC hard drive I have images shown as NEF. I desperately need to free up space on my hard drive, can I safely delete these NEFs?

    I use an external hard drive for my Lightroom library and I notice that all the images shown on there are DNG. On my MAC hard drive I have images shown as NEF. I desperately need to free up space on my hard drive, can I safely delete these NEFs?

    dj_paige wrote:
    however, I do point out that obtaining an additional hard drive and not throwing anything away seems a preferable solution to me.
    heidie22, dj_paige has a very good point there. I would not through away the NEF files; I would archive them to a external drive.
    By the way, I am assuming that converting RAW files to DNG is a decision you have made and not an accident.

Maybe you are looking for

  • N460GTX Cyclone 768D5/OC blue artifacts and stopped responding

    In the last month I have been having issues with my graphics card to the point that I can't play any game (at all, always stops responding), flash on websites cause video driver "stopped responding" error, vlc or media player videos cause stopped res

  • All iPhone music suddenly shows as "other" - can't sync now as no room left

    hi all, i put my iPhone in its official apple combination iPhone & apple bluetooth headset dock to sync it. for some unknown god-forsaken reason, it then gave the warning that this is not a device designed to connect to the iPhone specifically, and a

  • InDesign CS5 hangs when opening files

    I have recently begun experiencing a problem whereby I cannot open any existing InDesign documents. I can create new documents and work in them, but I cannot open any documents previously created in CS5. InDesign CS5, MacBook Pro, Mountain Lion OS 10

  • Credit check for Partially delivered order

    Dear Gurus We have a scenario where we are releasing a sales order (vkm3) forcefully since it is exceeding the dynamic credit check. Now when we do a partial delivery for the first time it is working fine, But when we again try to create a delivery f

  • SQL Server in getting hung

    HI All, we are facing SQL Server hung situation frequently as per the error log  we received below mention error: Using 'dbghelp.dll' version '4.0.5' **Dump thread - spid = 0, EC = 0x0000000000000000 ***Stack Dump being sent to D:\MSSQL10_50.MSSQLSER