From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas =?UTF-8?Q?L=C3=A9veill=C3=A9?= Newsgroups: gmane.emacs.bugs Subject: bug#17519: [PATCH] take into account QuantumScale when reading imagemagick images Date: Wed, 21 May 2014 21:31:32 +0200 Message-ID: <13FDD137-17E0-49D2-AA5C-9F13B31F833A@uucidl.com> References: <537A63BC.5090408@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1400700749 16232 80.91.229.3 (21 May 2014 19:32:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 May 2014 19:32:29 +0000 (UTC) Cc: 17519@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 21 21:32:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WnCFQ-0005JP-0a for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 May 2014 21:32:20 +0200 Original-Received: from localhost ([::1]:33352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnCFP-0003Bj-LW for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 May 2014 15:32:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnCFF-000326-5z for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 15:32:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnCF9-0005fh-AZ for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 15:32:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnCF9-0005fH-8Z for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 15:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WnCF8-00008e-6V for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 15:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas =?UTF-8?Q?L=C3=A9veill=C3=A9?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 May 2014 19:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17519 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 17519-submit@debbugs.gnu.org id=B17519.1400700705489 (code B ref 17519); Wed, 21 May 2014 19:32:02 +0000 Original-Received: (at 17519) by debbugs.gnu.org; 21 May 2014 19:31:45 +0000 Original-Received: from localhost ([127.0.0.1]:55613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnCEq-00007n-SN for submit@debbugs.gnu.org; Wed, 21 May 2014 15:31:45 -0400 Original-Received: from smtp4-g21.free.fr ([212.27.42.4]:58425) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnCEo-00007e-Mw for 17519@debbugs.gnu.org; Wed, 21 May 2014 15:31:43 -0400 Original-Received: from [192.168.1.105] (unknown [46.79.117.59]) (Authenticated sender: knos@free.fr) by smtp4-g21.free.fr (Postfix) with ESMTPSA id 4BD064C813B; Wed, 21 May 2014 21:30:07 +0200 (CEST) In-Reply-To: <537A63BC.5090408@cs.ucla.edu> X-Mailer: Apple Mail (2.1874) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89334 Archived-At: I tested this patch on OSX Mavericks, with ImageMagick compiled with a = quantum of Q32, and it works Nicolas On 2014-05-19, at 22:04 , Paul Eggert wrote: > Thanks for reporting this. Does the attached simpler patch fix the = problem for you? Dividing by QuantumRange instead of multiplying by = QuantumScale avoids potential double-rounding problems in future = versions of ImageMagick. >