Photoshop: Export Layers to Files .png only white matting

  • 1
  • Problem
  • Updated 3 years ago
  • (Edited)
I tried to Export Layers to Files, to create a bunch of .png logo files. I like to use the .png's on a black background, but unfortunately Photoshop uses standard white matting, resulting in dirty white raffled edges around the logo's. I don't need matting whatsoever. Any thoughts on this?
Photo of Jaydude


  • 29 Posts
  • 2 Reply Likes
  • Confused

Posted 3 years ago

  • 1
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 16406 Posts
  • 2615 Reply Likes
For this you'd have to modify the Export Layers to Files script found at Applications>Adobe Photoshop CC 2017>Presets>Scripts>Export Layers as Files.jsx

Change lines 910-915 to:
var id17 = charIDToTypeID( "MttR" );
desc4.putInteger( id17, 0 );
var id18 = charIDToTypeID( "MttG" );
desc4.putInteger( id18, 0 );
var id19 = charIDToTypeID( "MttB" );
desc4.putInteger( id19, 0 );
This will make the matte black instead of white. Just make sure "Transparency" is unchecked when you export.