From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Romain Francoise Newsgroups: gmane.emacs.devel Subject: Re: image size limit? Date: Wed, 12 Oct 2005 19:40:08 +0200 Organization: orebokech dot com Message-ID: <87k6giiqh3.fsf@pacem.orebokech.com> References: <87oe5v7q19.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129139275 6004 80.91.229.2 (12 Oct 2005 17:47:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2005 17:47:55 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 12 19:47:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EPkfG-00039p-SR for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2005 19:45:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EPkfF-00044b-Bk for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2005 13:45:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EPkez-00043z-GH for emacs-devel@gnu.org; Wed, 12 Oct 2005 13:45:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EPkew-00042V-3Z for emacs-devel@gnu.org; Wed, 12 Oct 2005 13:45:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EPkeu-00042A-Ro for emacs-devel@gnu.org; Wed, 12 Oct 2005 13:44:57 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EPkeu-0008WV-4k for emacs-devel@gnu.org; Wed, 12 Oct 2005 13:44:56 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EPkcN-0001rz-VG for emacs-devel@gnu.org; Wed, 12 Oct 2005 19:42:20 +0200 Original-Received: from yeast.orebokech.com ([82.67.41.165]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Oct 2005 19:42:19 +0200 Original-Received: from romain by yeast.orebokech.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Oct 2005 19:42:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 14 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: yeast.orebokech.com X-Face: }9mYu,e_@+e!`Z-P5kVXa3\_b:hdJ"B)ww[&=b<2=awG:GOIM List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:43936 Archived-At: For some image types, it is a simple matter of passing to the library the limits Emacs wants to set. For libpng, we could use png_set_user_limits() to set our maximum width/height. (libpng also has a built-in default limit of 1 million pixels in both dimensions.) For other libraries, the application can set the maximum amount of memory to allocate, see for example libjpeg's `max_memory_to_use' and `max_alloc_chunk'. Getting things right for all image types will probably be tricky... -- Romain Francoise | I just thought I'd go out it's a miracle -- http://orebokech.com/ | with a little bit more style.