Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100329 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59061 invoked from network); 31 Aug 2017 00:46:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2017 00:46:46 -0000 X-Host-Fingerprint: 2.24.106.64 unknown Received: from [2.24.106.64] ([2.24.106.64:5286] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/52-14408-47C57A95 for ; Wed, 30 Aug 2017 20:46:44 -0400 Message-ID: <7D.52.14408.47C57A95@pb1.pair.com> To: internals@lists.php.net References: Date: Thu, 31 Aug 2017 01:46:40 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 2.24.106.64 Subject: Re: GD vs Imagick From: ajf@ajf.me (Andrea Faulds) Hi, 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. > > 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? > Imagick is, as others have pointed out, huge and internally messy. GD is at least smaller. There's also a benefit to having just the one extension for image handling by default, it prevents fragmentation. For all its problems, I feel we are better off trying to improve GD than we are trying to tame the monster that is Imagick and bundling it. -- Andrea Faulds https://ajf.me/