Re: [PHP-DEV] ext/gd adding imagecompare

2024-07-10 Thread David CARLIER
Hi On Tue, 9 Jul 2024 at 19:16, Tim Düsterhus wrote: > Hi > > On 7/9/24 19:53, David CARLIER wrote: > > Agreed, I ll likely just commit as is sometime this week. > > I hereby formally claim that this is not a simple self-contained > feature. It does require an RFC. > > The addition of global `IM

Re: [PHP-DEV] ext/gd adding imagecompare

2024-07-09 Thread Tim Düsterhus
Hi On 7/9/24 19:53, David CARLIER wrote: Agreed, I ll likely just commit as is sometime this week. I hereby formally claim that this is not a simple self-contained feature. It does require an RFC. The addition of global `IMAGE_CMP_*` constants effectively introduces an entirely new "namesp

Re: [PHP-DEV] ext/gd adding imagecompare

2024-07-09 Thread Tim Düsterhus
Hi Yes, please no more global constants with names that are shortened beyond all recognition. On 7/9/24 18:59, Kamil Tekiela wrote: Boolean is a much more confusing value here. A bit mask is ok, but I would prefer a better solution. Maybe a simple value object? If it's "simple" then it wou

Re: [PHP-DEV] ext/gd adding imagecompare

2024-07-09 Thread David CARLIER
On Tue, 9 Jul 2024 at 18:31, Saki Takamachi wrote: > Hi David, > > It seems to be the opposite regarding his proposition gdImageCompare(im1, > im2) & GD_CMP_IMAGE. Then yes you are right, we are losing the specifics. > If you want to figure out how the image 1 and image 2 differ, you need to > us

Re: [PHP-DEV] ext/gd adding imagecompare

2024-07-09 Thread Saki Takamachi
Hi David, > It seems to be the opposite regarding his proposition gdImageCompare(im1, > im2) & GD_CMP_IMAGE. Then yes you are right, we are losing the specifics. If > you want to figure out how the image 1 and image 2 differ, you need to use > the rest of the api e.g. imagecolortransparent and

Re: [PHP-DEV] ext/gd adding imagecompare

2024-07-09 Thread David CARLIER
Hi, On Tue, 9 Jul 2024 at 17:59, Kamil Tekiela wrote: > Boolean is a much more confusing value here. A bit mask is ok, but I would > prefer a better solution. Maybe a simple value object? > That could be an option too sure.

Re: [PHP-DEV] ext/gd adding imagecompare

2024-07-09 Thread David CARLIER
Hi Saki. On Tue, 9 Jul 2024 at 17:49, Saki Takamachi wrote: > Hi David, > > > Hi, > > > > I plan to add imagecompare to the gd extension. No problem so far > however a little discussion of the returned value > > > > https://github.com/php/php-src/pull/14877#issuecomment-2217686123 > > > > I pers

Re: [PHP-DEV] ext/gd adding imagecompare

2024-07-09 Thread Kamil Tekiela
Boolean is a much more confusing value here. A bit mask is ok, but I would prefer a better solution. Maybe a simple value object?

Re: [PHP-DEV] ext/gd adding imagecompare

2024-07-09 Thread Saki Takamachi
Hi David, > Hi, > > I plan to add imagecompare to the gd extension. No problem so far however a > little discussion of the returned value > > https://github.com/php/php-src/pull/14877#issuecomment-2217686123 > > I personally see a value of a bitmask rather than just boolean which is not > har

[PHP-DEV] ext/gd adding imagecompare

2024-07-09 Thread David CARLIER
Hi, I plan to add imagecompare to the gd extension . No problem so far however a little discussion of the returned value https://github.com/php/php-src/pull/14877#issuecomment-2217686123 I personally see a value of a bitmask rather than just boolean whi