Photoshop: Layer mask-hide selection do not reduce size of PNG-24

  • 1
  • Problem
  • Updated 6 years ago
I have noticed in Photoshop CS5.1 and CS6 strange behaviour when saving for web file as PNG-24.

case1.
I have one layer photo 260x360.
Create Marquee square 200x200 and layer mask hide selection (effect: transparent square hole inside)
save for web as PNG-24 (transparency on)-> file size 131.4k

case2.
I have one layer photo 260x360.
Create Marquee square 200x200 and delete pixels (effect: transparent square hole inside)
save for web as PNG-24 (transparency on)-> file size 66.93k

Both pictures got same square transparent hole, but sizes are so different. Using mask do not reduce size of the file PNG24. Why is like that, bug ?
Photo of Rafal Jacubek

Rafal Jacubek

  • 3 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Not likely to be a bug.

Most likely one has hidden the pixel values (which are still there), while the other replaced them with a solid color.
Photo of Rafal Jacubek

Rafal Jacubek

  • 3 Posts
  • 0 Reply Likes
That's right, Is the way to force PNG uses 100% transparency as solid transparent colour. I always prefer works with mask than delete pixels, and keep the final file as small as possible..
Photo of Rafal Jacubek

Rafal Jacubek

  • 3 Posts
  • 0 Reply Likes
found it as Dirty Transparency in PNG Optimization