From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juan =?utf-8?Q?Jos=C3=A9_Garc=C3=ADa-Ripoll?= Newsgroups: gmane.emacs.devel Subject: Re: Optional support for GDI+ on Windows (emacs-28) Date: Tue, 31 Mar 2020 17:35:30 +0200 Message-ID: <86ftdoedvh.fsf@csic.es> References: <86lfnh8wzn.fsf@csic.es> <83pncs1ulv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="49183"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) To: emacs-devel@gnu.org Cancel-Lock: sha1:Mqtg3zG7a8wXVwVy9x0lBwkqouM= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 31 17:36:32 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJIwJ-000CeB-4d for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 17:36:31 +0200 Original-Received: from localhost ([::1]:40406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJIwI-0002nK-2n for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 11:36:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35039) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJIvV-0001OI-Fd for emacs-devel@gnu.org; Tue, 31 Mar 2020 11:35:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJIvU-00066A-4o for emacs-devel@gnu.org; Tue, 31 Mar 2020 11:35:41 -0400 Original-Received: from ciao.gmane.io ([159.69.161.202]:55682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJIvT-00065i-U6 for emacs-devel@gnu.org; Tue, 31 Mar 2020 11:35:40 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jJIvS-000BY1-F1 for emacs-devel@gnu.org; Tue, 31 Mar 2020 17:35:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 159.69.161.202 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246111 Archived-At: Eli Zaretskii writes: >> From: Juan José García-Ripoll >> >> Date: Mon, 30 Mar 2020 21:26:52 +0200 >> >> Here is a more canonical patch for the Windows port: > > Thanks. Was this version supposed to take care of the review > comments to the previous one? If so, perhaps you sent the wrong > patch, because it looks like all the issues are still there in this > version. Regarding your comments: * I do not know what is supposed to replace the code regarding search for terminal background colors. If this code is wrong, it is also wrong in the code that uses the PNG library (src/image.c). if (STRINGP (specified_bg) ? FRAME_TERMINAL (f)->defined_color_hook (f, SSDATA (specified_bg), &color, false, false) : (FRAME_TERMINAL (f)->query_frame_background_color (f, &color), true)) * Regarding the use of WCHAR in filenames, because this component only works when GDI+ is linked in, w32_unicode_filenames is always 1 and there is no need for additional translations. * Regarding the use of pointers to string data, once more, I am using the same code that is used in the image.c file to extract the image data from the user's input. If that code is wrong, then it is so in the PNG driver /* Read from memory. */ tbr.bytes = SDATA (specified_data); tbr.len = SBYTES (specified_data); tbr.index = 0; in the JPEG driver jpeg_memory_src (&mgr->cinfo, SDATA (specified_data), SBYTES (specified_data)); in the GIF driver, etc, etc. * Regarding stylistic conventions, all have been fixed. * Regarding the use of HAVE_NTGUI and unconditional removal of PNG/JPEG/etc, it has been replaced with a flag HAVE_GDIPLUS which is optionally selected at configuration time with --with-gdiplus, which defaults to NO. * All declarations have been changed to ANSI C99 * The static variable has to be initialized to 0 because it explicitely describes a condition (library has not been initiated) that is meaningful. * I replaced the use of float with double. You might want to do the same with nsimage.c if that is a problem. * All fprintf() are removed except for a piece of code that is currently commented out, but which is needed to have a look at the installed decoders. So, what exactly is missing? -- Juan José García Ripoll http://juanjose.garciaripoll.com http://quinfog.hbar.es