[rustypng] Discard profiles with invalid gamma
Unlike libpng (png_get_gAMA_fixed), image-rs does not validate the gamma
and can return an invalid value of zero. In that case, we should ignore
the profile and not attempt the color transform.
Add an explicit check to match blink/libpng semantics.
Bug: 438403373
Change-Id: I034c88938006ddde1ec750f1fd876adaab402420
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1038459
Reviewed-by: Daniel Dilan <danieldilan@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
1 file changed