From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: image-size Date: Thu, 20 Jun 2013 23:42:28 +0200 Message-ID: <2D9A8A78-829E-4AEC-BA3E-9409A1457053@swipnet.se> References: <837ghopy8a.fsf@gnu.org> <83zjukog7h.fsf@gnu.org> <83txksodgv.fsf@gnu.org> <83r4fwocqd.fsf@gnu.org> <83ppvgoaw9.fsf@gnu.org> <83mwqko9ge.fsf@gnu.org> <83k3loo66g.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1371764560 21933 80.91.229.3 (20 Jun 2013 21:42:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Jun 2013 21:42:40 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 20 23:42:39 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 1Upmcp-0001Sw-6D for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 23:42:39 +0200 Original-Received: from localhost ([::1]:44673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upmco-0000Gz-Qz for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 17:42:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upmch-0000Fv-Sn for emacs-devel@gnu.org; Thu, 20 Jun 2013 17:42:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upmcd-0001QX-SK for emacs-devel@gnu.org; Thu, 20 Jun 2013 17:42:31 -0400 Original-Received: from mailout.melmac.se ([62.20.26.67]:57109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upmcd-0001Pn-LW for emacs-devel@gnu.org; Thu, 20 Jun 2013 17:42:27 -0400 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 7BCC9C38F for ; Thu, 20 Jun 2013 23:42:22 +0200 (CEST) Original-Received: (qmail 6731 invoked by uid 89); 20 Jun 2013 21:42:22 -0000 Original-Received: from h-46-59-42-57.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.57) by mail01.melmac.se with ESMTPA; 20 Jun 2013 21:42:22 -0000 Original-Received: from [172.20.199.13] (unknown [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 18C811A03DC; Thu, 20 Jun 2013 21:42:22 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.1508) X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 62.20.26.67 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:160790 Archived-At: Hello. 20 jun 2013 kl. 22:57 skrev Lars Magne Ingebrigtsen : > Eli Zaretskii writes: >=20 >>> I can't see anything in the imagemagick code that talks to X, so I = think >>> it's a general Emacs image thingie. >>=20 >> IT CANNOT BE TRUE!!!! IF IT WERE TRUE, I COULD NOT HAVE USED IMAGES >> ON WINDOWS, where there's no X. >=20 > Of course there is no X stuff on Windows. But if you're running over = X, > lookup_image pushes data over X, for some reason or other. I have no > idea what the reason might be, but perhaps somebody else does. lookup_image calls img->type->load, and jpeg_load creates an X pixmap = (x_create_x_image_and_pixmap), i.e. on the X server, and copies the = image into the pixmap, i.e. transfers it to the server (XPutImage). The functions are totally different for X, W32 and NS, so how it works = on W32 is totally irrelevant for X and vice versa. Loading the image just to determine the size is a huge overhead. The = image loading routines already know the image size before sending it to = the server (or the equivalent for W32 and NS), otherwise they could not = allocate the right size for the Pixmap. No Imagemagic is needed to = figure out the image size. Jan D.