Photoshop: Export Layers to Files .png only white matting

  • 1
  • Problem
  • Updated 2 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

Jaydude

  • 29 Posts
  • 1 Reply Like
  • Confused

Posted 2 years ago

  • 1
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14549 Posts
  • 1892 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.