Re: ext/gd adding imagecompare

From: Date: Tue, 09 Jul 2024 17:31:30 +0000
Subject: Re: ext/gd adding imagecompare
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
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 all
> that jazz ... A bit too complex I feel.

Thanks for the explanation.

What I think is important to note here is that there are two types of users who will use this
feature:

1. Users who simply want to know if there is a match (i.e. a bool return value is sufficient)
2. Users who want to know the details of the differences

The object return type that Kamil mentioned was something I was considering as well, but I was
concerned that it would be a bit verbose for type 1 users and would necessarily incur the overhead
of object creation. (This is probably an unnecessary concern, as image analysis takes much longer.)

Regards,

Saki


Thread (10 messages)

« previous php.internals (#124313) next »