From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: image-size Date: Thu, 20 Jun 2013 12:04:52 +0200 Organization: Programmerer Ingebrigtsen Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371722713 31381 80.91.229.3 (20 Jun 2013 10:05:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Jun 2013 10:05:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 20 12:05:14 2013 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 1Upbju-0000hJ-03 for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 12:05:14 +0200 Original-Received: from localhost ([::1]:52931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upbjt-0000WP-Hj for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 06:05:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upbjp-0000Vu-Iv for emacs-devel@gnu.org; Thu, 20 Jun 2013 06:05:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upbjk-0004r7-El for emacs-devel@gnu.org; Thu, 20 Jun 2013 06:05:09 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:37764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upbjk-0004nc-9H for emacs-devel@gnu.org; Thu, 20 Jun 2013 06:05:04 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Upbje-0000EH-RY for emacs-devel@gnu.org; Thu, 20 Jun 2013 12:04:58 +0200 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Jun 2013 12:04:58 +0200 Original-Received: from larsi by cm-84.215.51.58.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Jun 2013 12:04:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.51.58.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEX5sRrZeREOGGUQDlMb LnsOKIJgQ0ERBSguNGyqXhUNIHQKI4H4MXR5AAACQUlEQVQ4jVWTPYvbQBCGZ0t1u41h20AI+Epz OCRtDKnNbXNq4kZCrcVp89GFFCm1jWDqIxzYnY04uP1zeWcl2fLbSJpH87k75EQPX2ZyLo/xRM5N aDP8gAfIBcD49fdf/C32G/CwgtYfk30OtisP1at6IAL69LbyTQH59fcBbCmPvYvuebB3IPeJPFIU nZK9LAoufL2Rwh7hAX3wsHPXAZf1H2llm8Dbuil/GNOZAF7XQygBZ180RmUZBVNUpX9/yQGHHWXK KMMM8DSBN2QgUjviQMEi/QQQaUdEmkIAL0o/gdembEkkgLrS349g3RTJbgJbTYtOkgwgRaKMg7Em oPufI/DFN7IclCYAqWuP+RIG6YuWFAd4MGtj0LzLAfJTU2gJpQwctNHI7qJ4nMfcpCxbY2gE8QqQ nI2eg2rogkXBAGyuHlmreARo/Z+7ADWCzswBQmXSSnIwaVg5zuMs5WbSClt7BalBTQrza62VXgBy JO9lJBguU4auUe+iKusYJVSaFbFmBqh0V/m9eMQe062kLLuQ3BrTfYoJ5C+oVynGbC0bC/ArRozd OZTVZppbklExct8lj1zK2lGb4WBVcvCw5+P1KXSWTjBUcNjjOkuOPiKJHK6tKrk9SOHSSHqJVSKL HJVEykcgsXDlhFCXIl3BK9agYdmQ0ktNl/2AS1ocse+TYQJn2UBsGnS8AfHFj/ocbwGWKunT+Jlf QHyWdb4bP/oZmKufyj0cjrf2ARyg5XKGZDvp7XCE/d2g5eAp4D/r7+FFmxZ3QgAAAABJRU5ErkJg gg== Mail-Copies-To: never X-Now-Playing: Various's _This May Be My Last Time Singing (3)_: "Deacon Williams + The Golder Stars - I Went To The House" User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:po6YvubIKdN6eFzdfUDen09e/00= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:160742 Archived-At: If I remember correctly from previous discussions, if you call `image-size', Emacs will go through all the normal stuff it does before displaying it, including pushing it to the X server, and then ask it how big it was. (I'm having a bit of a problem following the logic of lookup_image, but it looks complicated. :-) If that's what's happening, it tallies with my experience when using shr on big images. shr (by default) scales down images that are too big, so that they'll fit on the page. But since it first "semi-displays" the huge picture, then rescales, then displays the small picture, this is uncomfortably slow. At least under X. And under ssh, it's unbearable. So: 1) Is this what's going on? and 2) If so, would someone mind very much if I alter `image-size' to do a "fast path" iff a) we're asking for the pixel size, and b) we have imagemagick compiled it? If those two things are true, I could add some code to just ask imagemagick how big the image is without involving the display engine at all, and things would be a lot faster, I imagine. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/