From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74476: [PATCH] Explore JPEG loading without quantization Date: Sat, 30 Nov 2024 17:26:03 +0100 Message-ID: <87r06s8z8k.fsf@ledu-giraud.fr> References: <871pz39v6p.fsf@ledu-giraud.fr> <86iks581nf.fsf@gnu.org> <87y11093gx.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2266"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 74476@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 17:27:11 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tHQJK-0000R3-Kb for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 17:27:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHQJF-0008Sa-0b; Sat, 30 Nov 2024 11:27:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHQJC-0008SC-FZ for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 11:27:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHQJC-0006UF-7F for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 11:27:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=T6dTrgCY5e+gC7Hki4hkAr6waBFTLHqouI+1g7m4bU4=; b=fVh5l6Mah9SrsjP7qZ9yRhbVPpWhvH6wjuDJTLwIL0EFE22vbfGxPW36KyiQcSiPaSU5KUueIEDcBGOASzAiD1UXL/sYHBMf3/qI3mi5fexVux8j4zs/gLwIkjM2ri59wAilW1iMXoOpi9RdpdMANzeLw9bKmtAGNql1IQnCZgz62F/rQfAjyPmLGpevj3E3kmpCqJYsc7wtEMwpto9Z7hYWWXq1o8SiGZnGdoIaWfFC+NGUJMoNDv9rXB3v3H1ncU8jgQE43WgfFoh8ZW5UoKLqjOKNnlDgTY7RQq9hWCMb+TjBBoGBpV2PAUOALqCND3ngVJmhetPvMXzyiWRO3Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHQJC-0002lv-2G for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 11:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2024 16:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74476 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74476-submit@debbugs.gnu.org id=B74476.173298397110555 (code B ref 74476); Sat, 30 Nov 2024 16:27:02 +0000 Original-Received: (at 74476) by debbugs.gnu.org; 30 Nov 2024 16:26:11 +0000 Original-Received: from localhost ([127.0.0.1]:48401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHQIN-0002kB-AT for submit@debbugs.gnu.org; Sat, 30 Nov 2024 11:26:11 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:3334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHQIJ-0002jw-27 for 74476@debbugs.gnu.org; Sat, 30 Nov 2024 11:26:10 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=N1xZGEuu RbsDSoaBY3mGsonjL9f6vQAtQKzJW3NG6u0=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=T4m5XzJUa6CWL1cRrT+0iUqdmzRwaH PitI61M7fYoe8GIUwBcG+dXt0S4xyXHYWXQmjcJch4PUFCGjLDpk99Dw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=N1xZGEuuRbsDSoaB Y3mGsonjL9f6vQAtQKzJW3NG6u0=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=BqgowS/9N1tkTyY/sxK5pUo2fCLmWWV/DanboD LlhSEHit5Hccx4s0O6iEPAgYJxYvg414nWjMOXYBNKjCAh0+nPSKUK7vqAUowk7U1yC9oI WrecZacwgUIQ4GGScNmhnzlAZOCXfvU12hKZFaEk6SD4tOQO6golT5zdfK4miSskJnwrrF eQWFCFhuzYj8hSrvnLF5/sGBhLo279HghxNRXkv9OZHQeEoocbLQuLzNbuG5Oq1BoTEkEP 7htZBZ9lKzl+pUTu5D84nxXXLVNsRIYk3h+h5ujkZxBzT2YIHqqiuITI3ei/TTlxipIiRX U2NugB0Ib1KE43+XrqpsFQMw== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 8590e1c0 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 30 Nov 2024 17:26:05 +0100 (CET) In-Reply-To: (Alan Third's message of "Sat, 30 Nov 2024 15:37:29 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296176 Archived-At: Alan Third writes: > On Sat, Nov 30, 2024 at 03:54:38PM +0100, Manuel Giraud wrote: >> Alan Third writes: >> >> [...] >> >> > Manuel, I think you want to use lookup_rgb_color when setting the >> > pixels in the final image buffer. This should do the right thing. You >> > presumably also need to call init_color_table before using it, and I >> > see calls to colors_in_color_table and free_color_table which look >> > necessary, but I think they're already in the jpeg code. >> >> Hi Alan, >> >> I don't really understand: my proposed patch is getting rid of calls to >> lookup_rgb_color and init_color_table. > > Yes, but they're internal Emacs functions, not related to libjpeg. All > the other image library code uses them, so I think they are necessary > to handle systems that use colour mapping (and possibly Windows too, > it has a different implementation of lookup_rgb_color). > > For example, the PNG code looks like this: Ok. Thanks for the clarification, I'll modify my patch. -- Manuel Giraud