Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Editing an export script - please help!

Explorer ,
Aug 16, 2009 Aug 16, 2009

Hello Photoshop friends,

so I have an export script that I downloaded from the web which exports all layers to a file type of your choice - PNG, GIF, etc. This is fine, but the dialog box doesn't support file format options such as matte, dither, transparency and so forth. Is it possible to edit the script to give it literal values for these inaccessible variables instead of the default? I'v been digging around the script, but I'm not really sure what I'm doing.

Specifically, I want to leave the script intact except the following settings for the PNG8 format:

  • Colours 256
  • Transparency - YES
  • "No transparency dither"
  • Matte: "none" (currently it gives me a white matte)

Please, I would really appreciate if anyone could point me in the right direction please, please!

Ulerika.

TOPICS
Actions and scripting
967
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guru ,
Aug 16, 2009 Aug 16, 2009

Colors, dither, and matte are not standard save options with PNG files. To get those options you need to export using saveforweb.

It's hard to give you any suggestions on how to modify the script when you did not post the code or a link to the script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 16, 2009 Aug 16, 2009

Hey Michael, thanks for your quick reply. I tried to attach the script, but the forum won't allow me to do so. The script in question is here:

http://tranberry.com/photoshop/photoshop_scripting/tips/layerstoPNG.html

There is one big section dealing with PNG8 which I suspect is the place which needs to be changed. An extraction from this section for example reads:

"var id35 = charIDToTypeID( "Mtt " );

desc4.putBoolean( id35, true ); //matte

var id36 = charIDToTypeID( "MttR" ); //matte color"

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Aug 16, 2009 Aug 16, 2009

It's already saving with all your options except for no matte. To change that find the line

desc4.putBoolean( id35, true );         //matte

and change to

desc4.putBoolean( id35, false );         //matte

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 17, 2009 Aug 17, 2009
LATEST

Hey man, many thanks I will give it a go! As it turns out now after testing I will import the PSD into Fireworks and save as PNG8 with Alpha transparecny - this options is seemingly missing from Photoshop but it makes my images look much more natural! I'm not sure if Fw has a script that will export all layers to PNG8s as I require so perhaps I need a third party script again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines