GithubHelp home page GithubHelp logo

antipalindrome / photoshop-export-layers-to-files-fast Goto Github PK

View Code? Open in Web Editor NEW
1.5K 83.0 421.0 5.07 MB

This script allows you to export your layers as individual files at a speed much faster than the built-in script from Adobe.

License: MIT License

JavaScript 100.00%
photoshop adobe export

photoshop-export-layers-to-files-fast's People

Contributors

allen880612 avatar antipalindrome avatar crtgregoric avatar finscn avatar jgod avatar jschaf avatar merofeev avatar scmyyc avatar skjorn avatar tangleworm avatar willena avatar yushiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

photoshop-export-layers-to-files-fast's Issues

Help, exporting groups?

I recently found this nice script, but when running it, I couldn't get it to export whole groups.

Please tell me how I could export all selected GROUPS, with one png file PER GROUP. This would save me hours of time, if it worked.

Here are the groups I'd like exported:
screen shot 2015-05-15 at 1 11 46 pm

I'd like there to be one combined PNG per group, (so 10 pngs total) but after playing around with the settings, I couldn't achieve this. Please tell me how I could do this, or if it's not possible, please add this feature!

THanks, Stan

Get rid of the initial alert

We should get rid of the initial pop-up warning and move it to the dialogue itself, which should feature a cancel button. It's annoying. Of course, I can do it in my fork, but then I'd like to benefit from future changes. I take it that this is sort of a maintenance repo for the script, so I'm opening up a discussion.

I'm happy to do the implementation myself, but we need to agree on a common vision.

Expand trim option

I would like to have the option to trim layers just a pixel or two wider than layer actually is, usually I do this manually using expand selection feature and then I crop the layer.

Alpha channel from layer transparency

Generate alpha channel from layer transparency on the fly (i.e. wipe out alpha channels -> select visible pixels of the current layer -> save as alpha -> export -> repeat). Useful when exporting as TGA or BMP.

BMP as an option?

i know it's a relic, but Autodesk seems to love BMP as their custom button format :\

anyway, great work! this has saved me so much time :)

Image compression 'Save For Web'

What would make this script realy complete for me, would be the option and have more control for 'Save For Web' compression to the JPG files.

When i export the layers to jpg with the script and play with the quality settings, the quality of the image is adjusted. But the image file-size is doesn't differ that much. When i use the photoshop built in 'Save For Web' option the jpg file size is approximately 70-80% smaller in file size with better image quality than when i use the script. Would be awesome if the built in Save For Web compression was used.

Photoshop CC 2014 supported?

Error 21: undefined is not an object
Line: 354
-> dlgMain.ddFileType.itmes[exportInfo.fileType].selected=true;

creating constant layers

at present its only possible to have one background layer remain constant, id like to be able to have the option have making other files as well as whole directories constant.

Options to use Folder/Group name as prefix or suffix

Hallo, hope you don't mind me suggesting a feature!

Example:
On a project I have one folder full of body part sprites for a 2D mannequin (animate in max or after effects for example) and another folder of layers containing dots used to specify vertices for each body part. A script will read the Foot_L_dots and Foot_L_Sprite images (once exported), then create a mesh from the dots and add the sprite as a texture.

It'd be great if related layers (Foot_L) could have the same name, but then have the folder name added as a suffix: Foot_L_Dots, Foot_L_Sprite. Another option would be to use the folder name as a prefix.
As the script currently stands I get Foot_L.png and Foot_L-001.png.

Progressive saving

Hey, thanks for the great script! I'm looking for to tweak this slightly so that it can save out 'progressive' layers. So turning on one layer at a time from the bottom to show the final full composition.

Is this something that can be done? Would appreciate any help, thanks!

Export to PSD

I would like to export layers to separate psd to handle them separately.
I saw that in the standard export there is a PSD option but in this one it doesn't exist

TinyPNG

Hi there
I've just picked up TinyPNG which is a fantastic plugin for seriously reducing file sizes of PNG-24 with transparency. Went from a 250kb file down to 65kb.

What modifications do I need to make to this script to export using TinyPNG?

This might be relevant..

Much appreciated
=: s

Option to treat the lowest layer as background

An option to treat the lowest layer as background would be nice. That means keep it visible for every exported layer and don't export it by itself -- useful when having several variants with transparency against a common background.

Export visible layers only

I think there should be an option to export visible layers only. It should be relatively easy to implement using LayerComp. I'm more than happy to do it if I'm assured it will get to mainstream.

CS6 Freezes when using Smart Objects

Fantastic little script you've got here. I've used it in testing and found it extremely intelligently designed. I particularly like the ability to keep the bottom layer as a constant, the fact that the naming isn't odd like the default one is, and it doesn't trim by default (who the heck wrote that script anyhow?)

This is exactly how I am using it. I've got 60 icons which are .ai objects in a PSD as smart objects. The graphics girl can then open the object in AI where she prefers to work and I can remain in PS. Then I can export all layers in the blink of an eye. Zoom.

However, when I have smart objects in the file, PS hangs immediately and becomes totally unresponsive. I made a test file that was just a few hundred KB with only 4 layers to test with. When exporting after rasterizing all the layers, it spits them out cleanly. When having a single smart object, the hang occurs.

I tried 3 times with each variable and it was 100% repeatable.

Note that the workaround is to rasterize all smart objects prior to running the script. There's a bit of preparation required (ie deleting extraneous background layers), so this isn't the end of the world, but there's 3 of us that use this file and it's worrisome to think that the file might get... knackered if someone accidentally saved on the way out (yes I've done that by accident before).

Using Win7 64, Production Premium CS6 package.

-k

Crash when adding trim

Hi Guys

Script work well WITHOUT trim. I'm just in that situation a have 500 images that needs to be trimmed for making clickable surface buttons in an application.

I work on Photoshop CS6 (OSX Yosemite 10.10.2)

I get this error when i add trim. What can i do?

Error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.

  • Could not complete the command because of a program error.: on line 374

Here i have attached som images of my process..

Thanks you in advance.

screen shot 2015-04-27 at 14 34 28
screen shot 2015-04-27 at 14 30 55
screen shot 2015-04-27 at 14 31 09

Second time i run the script with same adjustment as above these two error come:

screen shot 2015-04-27 at 14 45 33
screen shot 2015-04-27 at 14 45 39

Export groups as folders

Make an option to export the layer tree as a file tree, where layer groups would correspond to folders.

(Clean up old file tree with the same root folder name? Restart file name indices in sub-folders? Apply file name prefix to folders as well? There's a lot of details to figure out...)

Feature Request: export .gif files

I've used this program to export PNG files of counties in Kansas (105 layers/counties) and the program is excellent! One of my programs uses GIF files. It uses GIF files since I can change the color of a layer by editing the text string for the GIF file. Perhaps I can also change the color in a PDF file, but I don't know how. If I exported the layers as GIF files they would work with my program.

Don't consider this request if it takes any effort. I've read the .jsx file and see that many parameters are set up and than it looks like an internal PhotoShop routine is called.

Thanks.

Add File name prefix

File name prefix -- is it useful? The built-in script has it, yet I never used it once.
(This came up in the @finscn's update #12.)

Saves as full sized image, ignores slices.

I've been looking for a much faster 'save layers to files' batch convert like this for a while. The reason being is the one that comes with photoshop while works wonders, it don't save the layers to the exact file name, and instead puts a bunch of numbers and such in front of all the file names.

I was joyed to learn that this one saves all the layers exactly as the file layer name is named... however... it saves the full size layers rather than just the 'area' the image is in.

I'm working with small files that could at times have 100 layers or more, there layed out across a larger sheet that displays them all, but each 'image' may only be 64x64 in size. Instead of saving say an 100x100 file into 64x64 peices as the images in each layer is set for and sliced to, it instead saves the while 100x100 file for each layer.

So I have layers that over lap one another, each layer creats a whole image, but need to be saved individually. Say, sprites for armor for a game, to mix and match. They are laid out over top each other in a means they would fit, same goes for the rest of the armors. I need to be able to save each of these peices in their own file at the size I have set in a slice for them so they save at the proper file name, save at the right image size.

Saving each layer and keeping the full size of the image sheet instead of cropping it down is useless to me.

If such an issue could be fixed this would be circulating across my work. Photoshops default is far to tedious, some having to rename a whole 1000+ images at times just to remove the numbers it insists on adding to the file name.

Trim images

I have a large PSD with a lot of layers in it. When I run the script, I get 300 images as a result with the same size (height/width) as the PSD file. So I have to crop every singe file :(

Edit: Ok, I just can create a custom action and run it over the new folder. But would be cool if there is an option to do it from script.

Become Indexed Files?

I have tested and i become only rgb Files not png indexed!

Can these change?

-stooni

Destination path copypaste support

So that's it: i want be able to copy path name and paste it in the destination field. Basically, I want be able to select the field and type path in there directly from the keyboard.

Allow resizing the dialog

I seem to have too small screen resolution, since the dialog disappears.
Please allow resizing the dialog, with scroll bar and/or responsive positioning dialog elements.

Define image size. For example - "not over 300kb"

Hello, I found your script at github and I'm thrilled! :) Ii is exactly what I was looking for. I miss only an OPTION - I would also like to define image size. For example - "not over 300kb".

Of course, Iwould like to donate for it even small sum :)

screenshot_15

Use top layer instead of lowest layer

Hi,

First of all I want to point out that this script is fantastic and that it saved us quite a lot of time. We use it to generate mockups so it was awesome to be able to iterate through logos to our products.

However this time, we would like to show a new product so we need to add the logo on all of our canvas. So far it seems that this is impossible.

The expected result is the exact same logic, iterate through visible layers for example, but instead of keeping the lowest layer as a background, it would keep the highest layer as an overlay.

Any samaritan can help us with this?

Cheers,
B

Obligatory Space replacement in filenames

Hi - loved this - just what I needed for a project - great speedy app that beats the stock one hands down.
However, having one major problem with it - it automatically replacing spaces in filenames with underscores. I understand why, but I wish to disable it - I need the spaces in my filenames!!

Tried replacing line 1302:
function makeValidFileName(fileName)
{
var validName = fileName.replace(/^\s+|\s+$/gm, ''); // trim spaces
validName = validName.replace(/[*/?:"|<>]/g, ''); // remove characters not allowed in a file name
//validName = validName.replace(/[ ]/g, '_'); // replace spaces with underscores, since some programs still may have troubles with them
return validName;
}

Weirdly, filenames returned now with a "-" rather than a "_":

stop_replacing.png > stop-replacing.png

can't find any code anywhere else that puts in a "-"!!!

Please help! I was close to finishing a 6 months project today, but came to a dead stop when hit this. :(

Thanks

openEXR

Thank you for the script. Do you plan to add the openEXR format ? Film artists around the world would be most grateful !

Trim Layers to Images

The built in script has the option to automatically trim the generated images. It's to hard to implement this on this fast script?

Great work, thanks!

Progress bar resource is corrupt?

Having downloaded the latest zip and tried to run it in photoshop cs6 / Yosemite constant error message appears
ember library mediator
(Progress bar resource is corrupt. Please redownload the script with all files)

File looks ok in preview.
Any suggestions?

How to Export Using A Master Layer?

Hi,

Is there a way to export 100 layers using a specific master layer as the background?
Can i "tag" a layer to keep constant in the export process?

thanks!

Photoshop CC 2014 freezes

Great work you guys have done here!

Unfortunately i can't get the script to work in Photoshop CC 2014 15.2.2 release or the older CC version 14.2.2. It keeps freezing when i press run. Photoshop freezes completely and the mouse shows a loading icon (which still moves).

Im running on an Imac with Yosemite 10.10.1.

Please let me know! Realy looking forward to use this.

Kind regards,
Iwan

Save for Web

Hello awesome contributors to the virtual world!

How about adding the option to export each layer as web safe or something similar that can dramatically reduce the file sizes but keep the quality of the images?

Praise: This is awesome

I've never given feedback to someone on Github before so I'm not sure if this is the proper method but this script was a lifesaver for me. It took forever for the built in PS script to run and it didn't even get me what I wanted. Your script is gold. Thank you very much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.