Hi Saki.

On Tue, 9 Jul 2024 at 17:49, Saki Takamachi <s...@sakiot.com> 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 personally see a value of a bitmask rather than just boolean which is
> not harder to handle than imagetypes.
> >
> > Let me know your thoughts.
> >
> > Cheers.
>
> If the return value is bool, does this mean that it will be true if the
> comparison targets are exactly the same, and false if there is even one
> difference? In other words, will we no longer be able to see where the
> differences were?
>
>
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 all that jazz ... A
bit too complex I feel.


> Regards,
>
> Saki

Reply via email to