Mobile app version of vmapp.org
Login or Join
Ogunnowo857

: Method to Export PNG-8 w/ Partial Transparency in Adobe PS CC Other Than "Quick Export" / "Export As"? I previously asked "How to Batch Export All Directory Contents to PNG-8, Overwriting Existing

@Ogunnowo857

Posted in: #AdobePhotoshop #Automation #Export #Png #Transparency

I previously asked "How to Batch Export All Directory Contents to PNG-8, Overwriting Existing Files?". The answer I received appears to be technically correct. But I forgot to mention one serious criteria -- my image has partial transparency.

Hence if my test image is:



File > Export > Quick Export to png-8 or Export (picking png-8) produces a beautifully visually equivalent file:



Where as Export > Layers to Files and Export > Save For Web (Legacy) produce the image seen on the right (image on left is original):



My issue is that most of my images I'm trying to export via Batch Actions rely on partial transparency. But the only two export to png-8 options I can find that seem to support partial transparency aren't currently supported by actions.

I get the Save for Web one, as per the hard edges motivation Adobe elaborates upon here. I don't understand as well why the layer export is also doing matteing on partial transparency, with no hint of this in the dialog (maybe a bug?) and w/ no way to even pick the matte color, for that matter (the automatically selected matteing is #ffffff in the color space of some of the content).

Are there any other ways to export to png-8, w/ partial transparency OTHER than Export as and Quick Export to png-8?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Ogunnowo857

2 Comments

Sorted by latest first Latest Oldest Best

 

@Alves566

Here's a solution – using only Photoshop... IF your files all have the same dimensions.


Be sure to check 'Smaller File (8-bit)' under 'Quick Export Format' (found by going to File > Export > Export Preferences)
Go to File > Scripts > Load Files into Stack
Click on the first layer in the Layers Panel and Shift+click on the last to highlight all layers
Right-click directly on the layers and choose 'Export As' or 'Quick Export as PNG-8...'


Done

~~~~~~~~ ~~~~~~~~ ~~~~~~~~

EDIT: If your files are of differing dimensions (or if the above method isn't working out for you for whatever reason) and you simply must have PNG-8s you can always download the old SuperPNG plugin for Photoshop, available here...

Photoshop can now give better results than SuperPNG right out of the box using 'Export'– but not in an Action/batch. Once you have the plugin installed you can create an action/batch and 'Save As' SuperPNG. This method was capable of outputting PNG-8 files with 8-bit transparency long before Photoshop could...

Here is your original image above (which started at 93kb) saved out from Photoshop using SuperPNG:



To produce this result (weighing in at 60.5kb) I used the following settings:



I could get the file size lower but it caused some unsightly banding. Results of course will vary with different images. Perhaps you can get better results by messing around with the settings...

Anyway after running that file through "The Gauntlet" I got this result:



This image is 38kb.

Note that this is only marginally smaller than the 32-bit example generated using PNGGauntlet in my other answer – but it is a PNG-8 with 8-bit transparency:

10% popularity Vote Up Vote Down


 

@Ogunnowo857

Forget Photoshop in this case... and don't get stuck on PNG-8 either. With partial transparency (in my opinion) PNG-24 (actually PNG-32) is the only way to go.

Use PNGGauntlet. And you're done.

Here is your sample image after having run it "through the gauntlet":



File size has been reduced from 93.4kb to 39.9kb:



Your PNG8 example above is 40.6kb so we did even better than that without needing Photoshop or PNG8.

Cheers

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme