Simplify Python code by receiving tuple from C by radarhere · Pull Request #8740 · python-pillow/Pillow
* Simplify Python code by receiving tuple from C, as per python-pillow#8740 * Use default PyTypeObject value * Removed AVIF_TRUE * Width and height are already set on first frame * Removed memset * Depth is set by avifRGBImageSetDefaults * Replace PyObject with int * After a failed pixel allocation, destroy non-first frame * Added error if avifImageCreateEmpty returns NULL * Python images cannot have negative dimensions * Test invalid canvas dimensions * Use boolean format argument * Handle avifDecoderCreate and avifEncoderCreate errors * tileRowsLog2 and tileColsLog2 are ignored if autotiling is enabled * Only define _add_codec_specific_options if it may be used * Test non-string advanced value * Simplified error handling in AvifEncoderNew * Corrected heading --------- Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>