From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: create-image on console emacs Date: Thu, 06 May 2010 16:05:08 -0600 Message-ID: References: <8339y4pzxc.fsf@garydjones.name> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1273183558 9409 80.91.229.12 (6 May 2010 22:05:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 6 May 2010 22:05:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 07 00:05:56 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OA9Cd-0004L4-Nr for geh-help-gnu-emacs@m.gmane.org; Fri, 07 May 2010 00:05:56 +0200 Original-Received: from localhost ([127.0.0.1]:48939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA9Cd-0008DI-3i for geh-help-gnu-emacs@m.gmane.org; Thu, 06 May 2010 18:05:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA9C5-00089z-NP for help-gnu-emacs@gnu.org; Thu, 06 May 2010 18:05:21 -0400 Original-Received: from [140.186.70.92] (port=54338 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA9C4-00087E-7V for help-gnu-emacs@gnu.org; Thu, 06 May 2010 18:05:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA9C2-0001Nb-BH for help-gnu-emacs@gnu.org; Thu, 06 May 2010 18:05:20 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:53596) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA9C2-0001NI-1V for help-gnu-emacs@gnu.org; Thu, 06 May 2010 18:05:18 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OA9Bw-00043x-QG for help-gnu-emacs@gnu.org; Fri, 07 May 2010 00:05:12 +0200 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 May 2010 00:05:12 +0200 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 May 2010 00:05:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 39 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73529 Archived-At: Lennart Borgman wrote: > On Thu, May 6, 2010 at 9:56 PM, Gary wrote: >> Can anyone explain to me why If I use emacs in the console and call >> create-image I get a message like "Non-X frame used" (whether I use an >> X11 binary or non-X)? I don't get this at all. >> >> The reason I ask is that I am trying to use the code from >> http://xahlee.org/emacs/emacs_html.html (*waves*) and as I said to Xah >> Lee off-list, while it may well be necessary to (for example) get an >> image's dimensions in order to display an image, the reverse is not >> true. Other console tools are able to do it fine, for example >> ImageMagick can tell me the dimensions from the command line: >> >> $ identify work/web1/Bilder/aussen.jpg >> work/web1/Bilder/aussen.jpg JPEG 874x583 874x583+0+0 DirectClass 8-bit >> 58.75kb >> >> X doesn't need to get involved until such time things actually (try to) >> get displayed. > > I tested this starting from "emacs -nw": > > (setq x (create-image "c:/my-image.jpg")) > (setq s (image-size x t)) > > create-image works, but image-size fails.with "Non-W32 frame used". > > It looks like the reason is that internally images are in some way > bound to frames. I do not know the reason for this, but you can see it > in the code of `image-size'. > > Maybe it is a bug. Please submit a bug report. Just a guess: the size of the image depends on the resolution of the display system. -- Kevin Rodgers Denver, Colorado, USA