Tag Info

Hot answers tagged

7

Select the particular layers you want to save as a .png file press Ctrl+e (that'll merge them into a single layer) select all and copy press Ctrl+n to create new file. The default option in Photoshop is that the size of the new file will be the same as what you've in clip-board. In this case, it'll give you a size with the empty spaces trimmed. Now ...


6

ExtendScript is sort of a blanket term; it's not a real programming language per se. It refers to the ability of a user to create scripts in his or her choice of AppleScript, JavaScript, or VBScript. Adobe provides a program to make scripts called ExtendScript Toolkit, which was most likely bundled with your install of Photoshop. On my computer it's in ...


5

You can create your own script if you want, here's a simple one: main(); function main(){ var Name = app.activeDocument.name.replace(/\.[^\.]+$/, ''); var Ext = decodeURI(app.activeDocument.name).replace(/^.*\./,''); if(Ext.toLowerCase() != 'psd') return; var Path = app.activeDocument.path; var saveFile = File(Path + "/" + Name ...


5

Yes, photoshop has something called actions. To use actions, go to Window -> Actions and create a new action. Then, do ONLY want you want you action to so (resize, duplicate, etc.) Once you have completed what you want your action to do, stop recording your action. Now, whenever you want, you can recall that action, and it will do the same thing, to ...


5

As I write code a lot too, I know your pain with this task. Luckily there are dozens of Sprite Generators out there. I don't even save the link, as you always find a fitting one soon. The above linked generator takes a ZIP file. Luckily they don't only give you the resulting sprite image/sprite, but write the CSS for you as well. Sidenote/Hint: Pay ...


4

You don't. The classes that are provided by the applications you are working with aren't extensible. But, what you can do to get around this is to create a record making use of Applescript's dynamic typing. set myLayerInformation to {layer:psLayerObj, fill color:fillColorObj, width:mWidth, height:mHeight} set targetLayer to layer of myLayerInformation ...


3

You could do it in Acrobat with Export > Image > PNG In Photoshop it's more complex. When opening a PDF you can select all pages by holding shift. That way all pages open and the opened documents are named by page number. Exporting is a different thing though. You could start with the Automate > Batch and choose all open files as source, and using an ...


3

If I understood you correctly, you could do this: Select all the layers you want to blur and then go Cmd+G+Cmd+E ( Cmd+G isn't necessarily needed ) Take the Brush tool and Soft round brush ( round brush with 0 hardness ) and make the brush really big ( big enough to cover the whole area you want to blur ) Then run it across the area you want to blur while ...


3

The only thing I can think of to save a little time would be to create a simple Action that does the Convert to Smart Object and then Rasterizes it in one press but you'd still have to go through each layer individually hitting this button. Of course I'm not exactly sure off the top of my head what the practical use for doing this even is. What About.com ...


3

You are essentially looking to do what is called a Data Merge. Photoshop has this facility: see for instance ( http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-7417a.html#WSfd1234e1c4b69f30ea53e41001031ab64-7414a )


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 ...


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 ...


2

Well the obvious answer is to create a batch process to do it for you so you don't have to do it 190 times. But maybe you can use one of Photoshop's automated processes to do it for you. In the old version of photoshop I use there's a Contact Sheet II process available. Perhaps you could set it up to include all the images you want to turn into a sprite, ...


2

Yes! Here's what you do. Open the Layer Comps window in photoshop. Click the snapshot button, hide your current layer, show the next layer, click the snapshot again. Create a layer comp snapshot for each state of your document that you want to have exported as individual files. Once you have all of those ready, go to File > Scripts > Layer Comps to Files. ...


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

I'm not getting the problem. Any settings you use in Save As are sticky for any particular format. They become the default until you change them. Non-interlaced is the default for png. If you're trying to save time, though, why in the world would you not set up an Action and assign a keyboard shortcut to it? No mouse clicks needed, just hit one key combo ...


2

You can automate most tasks in Photoshop by using actions. You can record them, enter them by hand or download others from the internet. They can be fully automated with predefined values or you can design them to ask for settings when they run. Short tutorial I don't think you can automate tasks in Lightroom and I don't have any experience with other ...


2

Your problem may require scripting. The name of the original image is included in the recorded action so it only works for that particular image or at least one with the same file name. A workaround that might be acceptable (though I admit hardly ideal) is to first duplicate your original image to rename it something generic, then run the action on that. ...


2

Layer → Arrange → Reverse will reverse the selected layers. I don't know how you can automate the selection of layers within a group though. I bet someone could create a script for that, if it was essential.


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

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

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

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

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

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

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

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 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

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

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