emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: image-size


From: Jan Djärv
Subject: Re: image-size
Date: Thu, 20 Jun 2013 23:42:28 +0200

Hello.

20 jun 2013 kl. 22:57 skrev Lars Magne Ingebrigtsen <address@hidden>:

> Eli Zaretskii <address@hidden> writes:
> 
>>> I can't see anything in the imagemagick code that talks to X, so I think
>>> it's a general Emacs image thingie.
>> 
>> IT CANNOT BE TRUE!!!!  IF IT WERE TRUE, I COULD NOT HAVE USED IMAGES
>> ON WINDOWS, where there's no X.
> 
> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]