Check if image has transparency?

I’m exporting to PNG and I noticed I can reduce the file size if I use JPEG. But JPEG doesn’t support transparency so it’s safer to export to PNG.

Is there a way to check if an image has transparency?

Does PNG support compression?

First google result of “does png support compression”:

Let me rephrase that.

Does PNG support a compression quality option during export of renditions in XD? I know it would be lossy.

From the docs it appears the quality option is only for JPEGs:

quality number (JPG renditions) Compression quality in the range [1, 100].

background ?Color (PNG & JPEG renditions) Alpha component ignored for JPG. Optional: defaults to transparent for PNG, solid white for JPG.

Or does JPEG export type support transparency? There are newer JPEG formats like JPEG XR that say they support transparency.

Transparency map support
An alpha channel may be present to represent transparency, so that alpha blending overlay capability is enabled.

In my case I was thinking I’ll export JPEG if the image doesn’t have transparency and export PNG if it does.

Given that PNG uses a lossless compression, quality settings don’t apply (in theory).

(Though people have worked out hacky compressed versions that still unzip properly, I don’t think that’s part of the standard.)

I would guess not.
Any png I’ve ever exported from any adobe software Is always much larger In size than Png’s compressed through tools like

So I would presume compression on PNG is not something adobe has ever built in

1 Like

Interesting… thanks. I used the Image Optimize plugin and it helped some. I’d like to see it add some more options but haven’t followed up on that. In my case I have a large image and want more compression. reduced the size by 66%. The image was almost too compressed.
Image Optimizer reduced the size by 18%.

I assume these compressors compromise quality at higher (non-standard) compression, just like JPEG.

1 Like

Yes. I’m looking for the Goldilocks compressed amount.

1 Like