Tag Info

Hot answers tagged

3

Keyboard shortcuts are your friend. http://www.shortcutworld.com/en/mac/Photoshop_CS5.html Remember, if you're on a PC, basically any command button in a short cut will be your Ctrl button. I have a very similar job editing photos for an ecommerce company, and shortcuts cut down the amount of time the job would've taken exponentially. Here's how I'd ...


3

What you'll want to use is: textItem.position, that will return the coordinates of the top-left most point of the bounding box you're looking for. Example code of textItem.position: alert(app.activeDocument.activeLayer.textItem.position); Then if you want the bottom-right point, simple add the height and width of the box to that coordinate. Something ...


2

I can recreate your scenario and I am not sure why it behaves this way. However, the following workaround is possible: var y = textLayer.textItem.position[1]; textLayer.textItem.position = [200, y]; For some reason, the individual values of the UnitValue array are not mutable and we have to set position as a new array.


2

For Single Lines of Text: This is a really rinky-dink way of doing it, but you could rasterize the text layer and then measure it: var artLayerRef = activeDocument.activeLayer; var newLayer = artLayerRef.duplicate(); newLayer.rasterize(RasterizeType.ENTIRELAYER); var width = newLayer.bounds[2] - newLayer.bounds[0]; newLayer.remove(); alert(width); I ...


2

In short, not without altering the document in some way that isn't terribly useful. A bit of a brainstorm follows (in Javascript)... Dimensions of text can only be given if the text is set to a kind of TextItem.PARAGRAPHTEXT, so discounting text wrapping would require extra calculations on your own as the PARAGRAPHTYPE requires wrapping. In terms of ...


2

As I mentioned in the comments, you should give some more clarity in your question to give a truly tailored answer. But, from what you stated above, I can help you break down your seemingly 6 steps into 3: 1) Copy a layer/layers 2) Make a new Document 3) place/drag them into the new document Step 1: Duplicate Do you know about the ...


2

There are two solution to this. 1. Write a script. Because of this issue, i have just started reading the manuals. i am the programming guy. But Photoshop does contain many classes, and coding JavaScript in plain text editor is not easy. And, more importantly, i found method 2 is working! 2. Through native Photoshop Preferences. i may need to write a ...


2

I know this is an old question, but for people just finding this question, you can automate this without saving separate files for each layer. Select all layers except the background Ctrl + Alt + A (Win) Cmd + Opt + A (Mac) Layer → Rasterize → Layer Style This rasterizes layer styles, vector layers, smart objects, etc. It works for CC and at least as far ...


2

This should be a lot faster. Instead of copy and pasting into a new file hundreds of times, it does this: Makes the Background into a Layer. Reduces the Canvas size down to the cell size. Slides the Layer around 'under' the Canvas to the correct location. Does a "Save For Web" essentially the same as your script. Go to 3 and repeat, then stop when it runs ...


2

A quick and dirty way is to run this script on the document: for (var i = app.activeDocument.layerSets.length - 1; i >= 0; i--) { app.activeDocument.layerSets[i].merge(); }; ...and then use the export_layers_to_files.jsx script you already talked about. This will take the top most Layer Groups, and merge them into a Layer named whatever the group ...


2

I would recommend Imagemagick as the appropriate tool here. It has a high learning curve, but is much faster than Photoshop for this sort of batch processing.. The following command should work: convert inputFolder/* +append output.png where inputFolder is a folder containing only the images you're interested in. They should be named in sequence (001, 002, ...


2

For positioning text you don't need a bounding box. I never use bounding boxes for text in PS. I click the text tool without dragging and set the text cursor without a box. Once the text is entered, I can center it vertically or horizontally just like any other shape using the align buttons--assuming I have something to align it to. I do the same ...


2

I am not sure if I understood what you are trying to do. How I don't have enough reputation to comment, I will write this step-by-step answer. Have you tried using an action to do the work? Open any image on photoshop, then create a new action. All you have to do is open the window Actions (option + F9), and click the blank paper icon to create a new ...


1

If you're using CS6 (cloud version) or CC, the Layers panel allows you to filter the visibility of layers by name. At the moment, filtering isn't something you can record in an action, although it's probably been added to what's scriptable (I've not checked). It does, however, make selective hide/unhide very quick and easy. Change the filter from Kind to ...


1

I don't think it can be done with actions, and I'm not aware of a plug-in that would do what you want, but you should be able accomplish that with scripting. It would help if you knew some javascript. You can find more information here: http://www.adobe.com/devnet/photoshop/scripting.html


1

The easiest method is to place all the individual images into a folder on your desktop then use File > Automate > Contact Sheet II... within Photoshop to select the folder of images and have them arranged into a grid for a single document. I believe the Contact Sheet script may be part of Adobe Bridge for CS6. If you already have everything loaded ...


1

To grab the bounding box of the currently selected paragraph text layer: var t = activeDocument.activeLayer.textItem; alert(t.width + ", " + t.height); This is documented in the JavaScript Scripting Reference (TextItem properties are listed starting on page 179)


1

Here's a script I wrote that might work. I've not tested it yet however. centerTextVertically( app.activeDocument.artLayers.getByName( 'Text-Layer-Name' ) ); /** * @param {ArtLayer} textLayer The text layer to apply the vertical centering. */ function centerTextVertically( textLayer ) { if ( textLayer.kind !== LayerKind.TEXT ) { return; // ...


1

I'd love to be proven wrong on this, but you can't vertically center text in Photoshop automatically. Just like you can't do it in Illustrator. You're stuck with manually adjusting the baseline shift. Here is the inevitable... but you can do this is InDesign. Yes, and it's awesome. But PS and AI are stuck without it. :( EDIT: Dang! I thought ...


1

I don't believe so. Scripting tells the application to do something, and does not control events outside the application environment (such as database input). What you are seeking is something like a key logger or screen recorder. Photoshop does offer a history log in its preferences. It will spit out things like this, which still isn't what you are ...


1

Found this script called Layer Saver when searching for a solution to this same problem. This script will allow you to save layers/layersets to different formats PNG, PSD, PDF, TIF, JPG or JPG Save For Web. A different menu is given depending if only layers or layersets found. Works like a charm and offers many different formats!


1

Since I don't have a working copy of your script this is a little difficult for me, but I wrote a script before and here's a function that goes throw and hides all layers: function hideLayers(ref) { var len = ref.layers.length; for (var i = 0; i < len; i++) { var layer = ref.layers[i]; if (layer.typename == 'LayerSet') ...


1

There are lots of reasons a script may stop prematurely. Often times it depends on the document. In this case, it could be a bad character in a layer name. Try killing layer 14 and see what happens. To debug, run your script from Adobe's ExtendScript Tool Kit. You can just let it get stuck or you can set specific breaks to inspect particular points in the ...


1

You can actually take a look at the source of the Fit Image script. It's in \Presets\Scripts\Fit Image.jsx (at least for CS5). In my script, the resampling method is on line 135: app.activeDocument.resizeImage(newWidth, newHeight, resolution, ResampleMethod.BICUBIC); So there you go, the default method is Bicubic. According to the reference guide, we ...



Only top voted, non community-wiki answers of a minimum length are eligible