Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124313 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 68FBD1A00B7 for ; Tue, 9 Jul 2024 17:31:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720546394; bh=Cm9ctOMjFEx1ucalSPDLVsIzcoIXylWcjlb+k1nOqrk=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From; b=QWlrxZ3De949nSIUd1Ad1YG09Fm4wYO45OAU9j8l1hdTizULW8KwP9vbhFu+LzZxM zX9XPzAkH0TxXw5YE5PlC+DwI5C/KfcxvJqZfzdLyT211vwPe0OpLaBapJj2sraAks +Es9G46C1gFXKix4iBLniKcQhUXZazVXXvIPjyQk6nA/VAPJcbu3WYKTK/PMi06HAe EzAYNyLJw1wzJyLLvPcw5KQQJbslATsusaFYYhdgXtN8zz2l1WabteJWjyr8RTM2RF IQKXlltGX3s/feMnMGafslYtGUwNfpmsmmYWMEo74af2cnRK91Xmsp82fwGVNH/QQe meL0J0IdqdfUw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C8C00180F3B for ; Tue, 9 Jul 2024 17:33:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, MIME_QP_LONG_LINE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail.sakiot.com (mail.sakiot.com [160.16.227.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 9 Jul 2024 17:33:12 +0000 (UTC) Received: from smtpclient.apple (unknown [117.55.37.250]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id E37154011C; Wed, 10 Jul 2024 02:31:43 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1720546303; bh=Cm9ctOMjFEx1ucalSPDLVsIzcoIXylWcjlb+k1nOqrk=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From; b=W9gavTnrWnFvza1tXEBVQ9//4v9kPI8vrwnftLti2vmMJOGntVDZsEqk5grH+LjZn 1M8DrmxFMzam39t0TeraiNXR5M3x0QSpfu+K5QkqBktoyuUNfsp+iyDA9jxHZM4ZS5 H8kF9WZak7gKvr6wel8Z7Mnk2BC98CL7WChx0AGs= Content-Type: multipart/alternative; boundary=Apple-Mail-E314D3DA-FD96-4CB6-B6FB-81CC0C45F04B Content-Transfer-Encoding: 7bit Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (1.0) Subject: Re: [PHP-DEV] ext/gd adding imagecompare Date: Wed, 10 Jul 2024 02:31:30 +0900 Message-ID: <67DDAB86-18E9-4C89-B1DA-CE8FC1E927F9@sakiot.com> References: Cc: PHP internals In-Reply-To: To: David CARLIER X-Mailer: iPhone Mail (21F90) From: saki@sakiot.com (Saki Takamachi) --Apple-Mail-E314D3DA-FD96-4CB6-B6FB-81CC0C45F04B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Hi David, > It seems to be the opposite regarding his proposition gdImageCompare(im1, i= m2) & GD_CMP_IMAGE. Then yes you are right, we are losing the specifics. If y= ou want to figure out how the image 1 and image 2 differ, you need to use th= e 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 w= ho will use this feature: 1. Users who simply want to know if there is a match (i.e. a bool return val= ue 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 a= s well, but I was concerned that it would be a bit verbose for type 1 users a= nd would necessarily incur the overhead of object creation. (This is probabl= y an unnecessary concern, as image analysis takes much longer.) Regards, Saki= --Apple-Mail-E314D3DA-FD96-4CB6-B6FB-81CC0C45F04B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi D= avid,

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. imagecolortr= ansparent 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 u= sers 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 w= as considering as well, but I was concerned that it would be a bit verbose f= or type 1 users and would necessarily incur the overhead of object creation.= (This is probably an unnecessary concern, as image analysis takes much long= er.)

Regards,

Saki
= --Apple-Mail-E314D3DA-FD96-4CB6-B6FB-81CC0C45F04B--