From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Corwin Brust Newsgroups: gmane.emacs.help Subject: Re: Get the actual width/height of an image Date: Mon, 14 Sep 2020 16:18:17 -0500 Message-ID: References: <28F86650-5F8B-41EC-BC39-54B083B1E394@gmail.com> <87y2lc3wt0.fsf@ebih.ebihd> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1290"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 14 23:19:13 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHvsX-0000Cs-7l for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 14 Sep 2020 23:19:13 +0200 Original-Received: from localhost ([::1]:46306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHvsW-0008Ju-Aa for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 14 Sep 2020 17:19:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHvrw-0008Jc-Sp for help-gnu-emacs@gnu.org; Mon, 14 Sep 2020 17:18:36 -0400 Original-Received: from mail-ed1-f46.google.com ([209.85.208.46]:46178) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHvrv-0003AQ-0i for help-gnu-emacs@gnu.org; Mon, 14 Sep 2020 17:18:36 -0400 Original-Received: by mail-ed1-f46.google.com with SMTP id a12so929578eds.13 for ; Mon, 14 Sep 2020 14:18:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=XzbBHQ7Sw+wfAlTexRpbh1576J8AK0D1ZNOjBTBQSfE=; b=By9dLU1HJm0j7Thvk1nvMFRF9TPqJYDu6BILDGgW8gGLEvPQGnW5Ib1zgKxLOPej05 dFOsXhu35mMRINlewBJXFFTrkMtlx7b/HVJCtoMEeWjy8g0/fwhAJC0Y4DXqDZ8MOD7j wBG3zcQ27Ox4Fq5X1u2kc4DRAuoM96dGlErMJk6Le+lGOhMf7mB/3QcHsvdsWisGHiVh enAQ4sXssyk6QM59m0o5PJVOKchT8kr5k4EskR8RwRa7y57A7Np/c9BqHLem34X3lB+q z291yjaDKsIwqU/sw+fVutob8B94Vs1f3ZCx/mgkB4j8pBQk6iRYjPjIjBqmxAT8NVLF Ccjg== X-Gm-Message-State: AOAM531M1s4qjiYGjUMxW7Y8Nk84B9+snIge0dHX2YNTAOTjnx7dyMpe yuWVIBbBVnF7a8vQoQ8OBxAP8LEkP9JFuMgpjwY= X-Google-Smtp-Source: ABdhPJxvRX2mTgSGjnBopYJnaPWQRt1+Zv7nhEI0ck32xKkabx+YPjjbEJirnT2DOZOP8P7cHlEQMihGjz6Yk8+iKlU= X-Received: by 2002:a50:fc83:: with SMTP id f3mr18637991edq.256.1600118309071; Mon, 14 Sep 2020 14:18:29 -0700 (PDT) In-Reply-To: <87y2lc3wt0.fsf@ebih.ebihd> Received-SPF: pass client-ip=209.85.208.46; envelope-from=mplscorwin@gmail.com; helo=mail-ed1-f46.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/14 17:18:29 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124050 Archived-At: Greetings! On Mon, Sep 14, 2020 at 3:53 PM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Yuan Fu wrote: > > > There doesn=E2=80=99t seem to be a function to get the > > aspect ratio of the image, or the actual pixel > > height/width of the image. So can I get > > this information? I think we can get the dimensions from `image-size', but note the PIXELS argument: (image-size SPEC &optional PIXELS FRAME) | Documentation | Return the size of image SPEC as pair (WIDTH . HEIGHT). | PIXELS non-nil means return the size in pixels, otherwise return the | size in canonical character units. | FRAME is the frame on which the image will be displayed. FRAME nil | or omitted means use the selected frame. | Calling this function will result in the image being stored in the | image cache. If this is not desirable, call image-flush after | calling this function. > For everything batch and graphics, use ImageMagick. I think Emacs is moving away from ImageMagick and toward "self-implemented" image manipulation &ct. functions. Not that IM has "gotten rusty" -- it isn't preferred from an elisp perspective which could be important in terms of portability to other Emacsen. > > -- > underground experts united > http://user.it.uu.se/~embe8573 > https://dataswamp.org/~incal > > Regards, Corwin