Sergey, Here is my latest webrev: http://cr.openjdk.java.net/~lbourges/png/PNGWriter-6488522.3/
One more reviewer, please ? > Probably it can be made local to the write method, but this version looks fine too. > > You're right. I will improve that, I did it too quickly. > Fixed: it is clearer and simpler. Regards, Laurent