Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100218 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60503 invoked from network); 15 Aug 2017 13:27:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2017 13:27:02 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.19 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.19 mout.gmx.net Received: from [212.227.15.19] ([212.227.15.19:53922] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7C/7B-34801-5A6F2995 for ; Tue, 15 Aug 2017 09:27:02 -0400 Received: from [192.168.2.123] ([79.243.116.167]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M70HF-1dMl8e11WP-00wo0i; Tue, 15 Aug 2017 15:26:57 +0200 To: Rasmus Schultz , PHP internals References: Message-ID: Date: Tue, 15 Aug 2017 15:26:57 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:RMgnVNlOgbUhrgtb6tDYNUUkVJnZR3j8lD9xiuequkEj7/A8bgg IvYfcXqfGvvYxG+EeNEYh3K6GDhpjraOJ7rUomH9xGHIg6dbFdoUN6bz2i16NZ3/ibtMWfG jFtxnub+sDZA/jtF+5YOMFpcgNKiHInknhQPCLo/YMQ0KvrJ1yRyCmvf4v6BcgjuHGJJp52 cCU4sA6eBFowMTJaugTGg== X-UI-Out-Filterresults: notjunk:1;V01:K0:yBve29G/SRY=:VjhMCdwU/Beh5WBTzm2Kry vWYPNxEbqXZrtYlsWobXtR4df3tosMNzn1ermDHSy+JIcFcaT3Mm9rCQI1Z3IBNj4v2ff8paJ qlZfrEPsBCA0HVJS0+oi9+MDtA/UBGUm+PJVrKs2LjAWrukCXnLNBqOemnIKfk/Y4iqUF5GkD qPNg0+Ia7F8VvZFHj3ZGdFldQgxC9MFIKFuFgnCgLV4jMe0Da9aVM+ZW/UE4yZufYca1MdRTX n2PUKW6m9pIiCrIkDo6Yb1Y0WebomnPTTmvrg58M3je3Ytu2yFMEPbVENOEkwVXr3fO5KbDed xf+l7Tod1H+cr31ZtJrWmcrTquNWYMGXjn2wF8tQE9kW/TiSyTOtfKKVg86Sw4BiaoQ02LM2Z ajomVG984E8up6VJh38BFJwklsYxOg0ZylXPQPVUWaVNBHidGvLjjoIe8/KaqYiPzgIQPfPYn hzoQqJ1hCjKy5zdKqVq71Xi4MpfbAuIHDXuFozLAspuOeNaRQOK7nLZEZSfcR8VXhLsNyf2Lj j114Wsrw+bow6kbjhy/y6epDVuaXM+Z7UExbpljQFGV3AD0QypF2DEj1RbN+tBXCRcKCKBTci yY6wut+jiCIbjdf6++AyHJgKwSr5696gM3dyx6T8EWHFQFA7OrA5qagYlDVQtuxBgVzGQ5LXV ldZ46/+GRPGaAL6z7Qs0JOLehC8M5cRJcpZsmS1gBjPE8KQpFveis7QBvjImZNLd3bK82qRPT vKhIjq9mhX2Ry6wIi2B/Pv5FAK06Hsh8JNjzmffDCliSMlagViBuhuECNIgWBYz1xmZDfvgPu eKloWyTdQeM1yhb1gXxkSZmEjCHCP+ioOWxCu4oFpN4NIYtXPo= Subject: Re: GD vs Imagick From: cmbecker69@gmx.de ("Christoph M. Becker") On 15.08.2017 at 12:52, Rasmus Schultz wrote: > The following GD issue is all-too common: > > https://stackoverflow.com/questions/5773032/how-to-stop-gd2-from-washing-away-the-colors-upon-resizing-images > > Basically anyone who's ever accepted uploaded images and resized or > converted them, has bumped into this. > > Only Imagick makes it possible to work around this issue, it's not possible > with GD, at all - and the internal behavior of GD is arguably "wrong", as > the visible output of simply opening and saving a JPEG image with GD is > mangled with washed-out colors. Indeed, GD completely ignores and forgets color profile information when loading an image, and thus doesn't write it back on saving. See . However, as workaround it would be possible to read the color profile by other means and to re-apply it after the image has been saved. For simple JPEG to JPEG resizing lossless JPEG transformations would be even more suitable (see ) – I don't know whether this is already supported by Imagick or Gmagick. > I am starting to wonder why GD is the default in PHP? > > It's a pretty outdated library with a clunky API - we have Imagick with a > much more concise API and a ton more useful features. > > Why is the less-capable image library the default on the PHP platform? Why > not Imagick? This is most likely for historic reasons. In the years libgd was basically unmaintained, PHP developed the bundled libgd further, and most of that was later back-ported to libgd. Furthermore most current maintainers of libgd are also guys with a php.net account – so there's some bond. -- Christoph M. Becker