[php-src] PR #14523: ext/gd: de-factorize image output functions
| From: | thg2k | Date: | Sun, 09 Jun 2024 13:07:12 +0000 |
| Subject: | [php-src] PR #14523: ext/gd: de-factorize image output functions | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-26604@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/14523
Author: thg2k
The image output functions imagegif/imagepng/imagewebp/imageavif/imagejpeg were all calling the
static function _php_image_output_ctx which was basically a big switch statement between each image
type which also have different parameters.
The only identical part was the call to create_stream_context_from_zval that is now merged with
create_output_context.
This greatly increases readability and maintainability of this file.