Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124317 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 EC6BB1A00E0 for ; Tue, 9 Jul 2024 17:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720547721; bh=57p6RUXvh4gD9DR5cJIehg1W2wWkywFzMpJ+GLUsI1s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=eFH3UDteKCJOOs/FTgkk5t8eWvYu0+zMuQM/E6h6DVpZ4fvu5uhslvSp4/WxPROe/ WNAN5BLAr7PMicw0QeQDxuiM6nzTWh+Mab1nr75V1XPjaAvDdGuBIXam04wCDWEz7/ j5r7AfN73BhUFZt+ey3250ZHuk91whRf6BR0HpOJ3OU+meMyXzeIdM1n/5Z1DlI4ki B53CpmId4PYfX9egivlm6jsWp6ZMHoz5wFfgTzrI8kW2s5Np/dUB2kom+BYUloxYZc WM1xaG/VJJ9JZGCyXvKz120YDsY7ELWZLQTc6Eu48JJ+L3HvKcsgSwBeWPBju3NxdX TidbNvO96AV6w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1DE4D18150D for ; Tue, 9 Jul 2024 17:55:19 +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,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (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:55:16 +0000 (UTC) Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-6b553b1a159so32211946d6.0 for ; Tue, 09 Jul 2024 10:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720547630; x=1721152430; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=57p6RUXvh4gD9DR5cJIehg1W2wWkywFzMpJ+GLUsI1s=; b=EoUIZ61GI9TYQJ122GFL9luyN5S7f7AEC/LYXAmQXmfrmlMKeZ7ZjfjQzPKHwY1Uhz KpfF9jCJAvv4U91m60uI6gB2KhuiqIreTz0UvwrB0cN19rTj9zr6KoySzDAYXj+vmr3t bhNGa4jbY1oF70x3QN2GI2q644DTOnKbs47VeHfIBVcDrVYxGlOA/0LauszZwtTAEyy0 hyjxkJLBggydy4R8PkzK8ASOVjvzqsnuC1gLLBauFCbuhba3ciDxZuo6T0ljwyAzEK1v G9rO1IeOHRD6vxQYbtsnq0COIggt8Ho0EeSHEicMU9aFXhsJgsyK0T2k5N+z/+udTRTv x3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720547630; x=1721152430; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=57p6RUXvh4gD9DR5cJIehg1W2wWkywFzMpJ+GLUsI1s=; b=jRyMsYSKZ+SpQG+zjq1LvUfG0wej4kO9dM8A5LB48pZ3lcYp+wxkAvMkl50lOUojmm VMjSgXwVhBrQmIl1jDAB+iY/oycze59Jx7EHK80NBodTxt1Xg4xcRGMjGLrB9YCKHqRj gZhczZL1hSeLbz/QTXS+VhTKm0UqoNqFwEijW3zsuxcL8gmm3m9xQlmRSMWEKCypU/4Z y/DRrsxhH7kMmYzZFsg/kG9YAA9Msp/FOLEIsWD1eFO2r+fz1krVllgwHjfOfxQjy8bd ZPLVaitN6sBhjypHG7dbQ97fKAUpJNNC9v9ATVN+nG2vx2dN2zbYpiCautxHN4Tg5nJt cneA== X-Gm-Message-State: AOJu0YwZzvcz7phZ3WwyfkFJa8qIDEBq4Hwg3cycKhbGm6v5eqEAwIpq vGF+gzk8Y/NKCJhFAYZSs/Yoh0ViiKAYDE/5ExzIl2Ee2NZKGekPAz4BHu3ZDeYvCC10w6RrTOe 0NkPOSngWKaE5f87c0W8b8r0hPqssyg== X-Google-Smtp-Source: AGHT+IEa5AdN1RoOj/2dLb9xoZ50ZJC6kuT9o9rJ1bl2dVojfjbjPYF3xKc6qR1azKSfUbfmbhIWH3eitou5FnyuI+o= X-Received: by 2002:a05:6214:2a88:b0:6b2:bdcc:f45b with SMTP id 6a1803df08f44-6b61c1b7071mr38967546d6.47.1720547629908; Tue, 09 Jul 2024 10:53:49 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <67DDAB86-18E9-4C89-B1DA-CE8FC1E927F9@sakiot.com> In-Reply-To: <67DDAB86-18E9-4C89-B1DA-CE8FC1E927F9@sakiot.com> Date: Tue, 9 Jul 2024 18:53:38 +0100 Message-ID: Subject: Re: [PHP-DEV] ext/gd adding imagecompare To: Saki Takamachi Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000004cc896061cd436a5" From: devnexen@gmail.com (David CARLIER) --0000000000004cc896061cd436a5 Content-Type: text/plain; charset="UTF-8" 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 > 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) > True. Anyhow, such users can always do imagecompare($im1, $im2) & IMG_CMP_IMAGE themselves eventually. > 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.) > Agreed, I ll likely just commit as is sometime this week. Cheers. > > Regards, > > Saki > --0000000000004cc896061cd436a5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, 9 Jul 2024 at 18:31, Saki Tak= amachi <saki@sakiot.com> wrote= :
Hi David,

It seems to be t= he opposite regarding his proposition=C2=A0gdImageCompare(im1, im2) & GD_CMP_IMAGE. Then yes you are right, we are losing the speci= fics. If you want to figure out how the image 1 and image 2 differ, you nee= d 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 impor= tant to note here is that there are two types of users who will use this fe= ature:

1. Users who simply want to know if there i= s a match (i.e. a bool return value is sufficient)
=

True. Anyhow, such users can always do imagecompare($im= 1, $im2) & IMG_CMP_IMAGE themselves eventually.=C2=A0
2. Users who w= ant to know the details of the differences

The obj= ect return type that Kamil mentioned was something I was considering as wel= l, 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.)

Agreed, I ll likely just commit as is someti= me this week.
Cheers.=C2=A0

Regards,
=
Saki
--0000000000004cc896061cd436a5--