Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101050 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43655 invoked from network); 4 Nov 2017 16:41:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2017 16:41:07 -0000 X-Host-Fingerprint: 62.180.109.77 unknown Received: from [62.180.109.77] ([62.180.109.77:24499] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/30-09857-D9DEDF95 for ; Sat, 04 Nov 2017 11:41:02 -0500 Message-ID: To: internals@lists.php.net X-Mozilla-News-Host: news://news.php.net:119 Date: Sat, 4 Nov 2017 17:40:56 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Posted-By: 62.180.109.77 Subject: Proposal: Rename image functions From: gmblar@gmail.com (Andreas Treichel) For a better readability of the gd functions I would like to rename them so that they contain underscores to separate the words. The only exception is image2wbmp which is renamed to image_to_wbmp. The order of the parameters of all functions whould be unchanged. Due to the unchanged parameters it should be easyly possible to create wrappers for forward / backward compatiblity to use the new function names in old versions of PHP and via versa. This was already part of the (inactive?) RFC Consistent Function Names https://wiki.php.net/rfc/consistent_function_names. But this seems to be too big change for a single RFC. Step 1: I create a patch with the new aliases. Step 2: Merge the changes with next minor release of PHP 7.x. Soft deprecation of old function names in the manual. Step 3: Deprecated old function names with PHP 8.0. What is your opinion for this change? Did you prefer "image_" or "gd_" as a common prefix? New name Old name image_affine imageaffine image_affine_matrix_concat imageaffinematrixconcat image_affine_matrix_get imageaffinematrixget image_alpha_blending imagealphablending image_antialias imageantialias image_arc imagearc image_bmp imagebmp image_char imagechar image_char_up imagecharup image_color_allocate imagecolorallocate image_color_allocate_alpha imagecolorallocatealpha image_color_at imagecolorat image_color_closest imagecolorclosest image_color_closest_alpha imagecolorclosestalpha image_color_closest_hwb imagecolorclosesthwb image_color_deallocate imagecolordeallocate image_color_exact imagecolorexact image_color_exact_alpha imagecolorexactalpha image_color_match imagecolormatch image_color_resolve imagecolorresolve image_color_resolve_alpha imagecolorresolvealpha image_color_set imagecolorset image_color_transparent imagecolortransparent image_colors_for_index imagecolorsforindex image_colors_total imagecolorstotal image_convolution imageconvolution image_copy imagecopy image_copy_merge imagecopymerge image_copy_merge_gray imagecopymergegray image_copy_resampled imagecopyresampled image_copy_resized imagecopyresized image_create imagecreate image_create_from_bmp imagecreatefrombmp image_create_from_gd imagecreatefromgd image_create_from_gd2 imagecreatefromgd2 image_create_from_gd2_part imagecreatefromgd2part image_create_from_gif imagecreatefromgif image_create_from_jpeg imagecreatefromjpeg image_create_from_png imagecreatefrompng image_create_from_string imagecreatefromstring image_create_from_wbmp imagecreatefromwbmp image_create_from_webp imagecreatefromwebp image_create_from_xbm imagecreatefromxbm image_create_from_xpm imagecreatefromxpm image_create_truecolor imagecreatetruecolor image_crop imagecrop image_crop_auto imagecropauto image_dashed_line imagedashedline image_destroy imagedestroy image_ellipse imageellipse image_fill imagefill image_fill_to_border imagefilltoborder image_filled_arc imagefilledarc image_filled_ellipse imagefilledellipse image_filled_polygon imagefilledpolygon image_filled_rectangle imagefilledrectangle image_filter imagefilter image_flip imageflip image_font_height imagefontheight image_font_width imagefontwidth image_ft_bbox imageftbbox image_ft_text imagefttext image_gamma_correct imagegammacorrect image_gd imagegd image_gd2 imagegd2 image_get_clip imagegetclip image_gif imagegif image_grab_screen imagegrabscreen image_grab_window imagegrabwindow image_interlace imageinterlace image_is_truecolor imageistruecolor image_jpeg imagejpeg image_layer_effect imagelayereffect image_line imageline image_load_font imageloadfont image_open_polygon imageopenpolygon image_palette_copy imagepalettecopy image_palette_to_truecolor imagepalettetotruecolor image_png imagepng image_polygon imagepolygon image_rectangle imagerectangle image_resolution imageresolution image_rotate imagerotate image_save_alpha imagesavealpha image_scale imagescale image_set_brush imagesetbrush image_set_clip imagesetclip image_set_interpolation imagesetinterpolation image_set_pixel imagesetpixel image_set_style imagesetstyle image_set_thickness imagesetthickness image_set_tile imagesettile image_string imagestring image_string_up imagestringup image_sx imagesx image_sy imagesy image_to_wbmp image2wbmp image_truecolor_to_palette imagetruecolortopalette image_ttf_bbox imagettfbbox image_ttf_text imagettftext image_types imagetypes image_wbmp imagewbmp image_webp imagewebp Further improvement: Rename the output functions to image_write_* New name Old name image_write_bmp imagebmp image_write_gd imagegd image_write_gd2 imagegd2 image_write_gif imagegif image_write_jpeg imagejpeg image_write_png imagepng image_write_wbmp imagewbmp image_write_webp imagewebp