From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: Image rescaling Date: Mon, 15 Sep 2014 14:55:50 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410785799 30009 80.91.229.3 (15 Sep 2014 12:56:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Sep 2014 12:56:39 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 15 14:56:33 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XTVpZ-0005HS-2j for ged-emacs-devel@m.gmane.org; Mon, 15 Sep 2014 14:56:33 +0200 Original-Received: from localhost ([::1]:59543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTVpY-0000NL-KS for ged-emacs-devel@m.gmane.org; Mon, 15 Sep 2014 08:56:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTVpO-0000MJ-Pp for emacs-devel@gnu.org; Mon, 15 Sep 2014 08:56:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTVpH-0008GP-1X for emacs-devel@gnu.org; Mon, 15 Sep 2014 08:56:22 -0400 Original-Received: from mx2.bahnhof.se ([213.80.101.12]:9839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTVpG-0008GF-R2 for emacs-devel@gnu.org; Mon, 15 Sep 2014 08:56:14 -0400 Original-Received: from localhost (mf.bahnhof.se [213.80.101.20]) by mx2-reinject (Postfix) with ESMTP id E0A1E40DC9 for ; Mon, 15 Sep 2014 14:56:12 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MF4) Original-Received: from mf4.bahnhof.se ([127.0.0.1]) by localhost (mf4.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HL1UqAiTNuYo for ; Mon, 15 Sep 2014 14:56:04 +0200 (CEST) Original-Received: from mta.verona.se (h-235-102.a149.priv.bahnhof.se [85.24.235.102]) by mf4.bahnhof.se (Postfix) with ESMTP id 872B23D7881 for ; Mon, 15 Sep 2014 14:56:04 +0200 (CEST) Original-Received: from localhost (unknown [127.0.0.1]) by mta.verona.se (Postfix) with ESMTP id 579F65197E2 for ; Mon, 15 Sep 2014 12:56:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at verona.se Original-Received: from mta.verona.se ([127.0.0.1]) by localhost (exodia.verona.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oZq5xasl3iHB for ; Mon, 15 Sep 2014 14:55:50 +0200 (CEST) Original-Received: from exodia.verona.se (www.verona.se [192.168.200.15]) by mta.verona.se (Postfix) with ESMTP id 546845197DD for ; Mon, 15 Sep 2014 14:55:50 +0200 (CEST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Mon, 15 Sep 2014 14:45:51 +0200") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 213.80.101.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174320 Archived-At: Lars Magne Ingebrigtsen writes: > Most of the image format decoders (jpeg and gif, for instance) do not > support image rescaling. So shr uses ImageMagick for all its image > handling. > > There are two problems with this: > > 1) ImageMagick is crashy. Virtually all Emacs crashes I get happen deep > in the ImageMagic code. I mean, I don't get a lot of crashes, but they > happen from time to time, and are pretty annoying. > > 2) Some people run Emacs without ImageMagick built in, but usually have > the other libraries enabled. > > So I would propose to add a general image scaling function, and use that > in all the image handling functions. Without image rescaling, Emacs is > pretty useless for anything that involves handling images. > > Does this sound OK to everybody? > > And if so, is there an FSF-copyright-assigned quality image rescaling > function out there that I could adapt to Emacs so that I don't have to > write it myself? >"? Its a pity ImageMagic is crashy, but I take your word for it, since i dont experience it myself. Maybe something can be extracted from Gimp or Inkscape? Other than that, implementing a schoolbook image rescaling algorithm shouldnt be too much work. -- Joakim Verona