Retrieves byte array from gdImagePngPtr().