From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takeshi Teshima Subject: Error with inline image resizing Date: Tue, 2 Aug 2016 17:46:13 +0900 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c1246aad11227053912bf1b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUVL9-00080H-HV for emacs-orgmode@gnu.org; Tue, 02 Aug 2016 04:46:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUVL5-0004lA-3g for emacs-orgmode@gnu.org; Tue, 02 Aug 2016 04:46:17 -0400 Received: from mail-ua0-x231.google.com ([2607:f8b0:400c:c08::231]:33637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUVL4-0004l5-T0 for emacs-orgmode@gnu.org; Tue, 02 Aug 2016 04:46:15 -0400 Received: by mail-ua0-x231.google.com with SMTP id k90so124269351uak.0 for ; Tue, 02 Aug 2016 01:46:14 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --94eb2c1246aad11227053912bf1b Content-Type: text/plain; charset=UTF-8 Hi all, When I try to show inline images automatically resized in an org-mode buffer, the thumbnail doesn't show (a big blank box shows where the resized image should be) and the following errors are echoed in the "*Messages*" buffer. ``` ImageMagick error: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/504 ``` The image types I have tried are JPG and PNG. When tried with a PNG file, the error message changes to ``` ImageMagick error: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/504 ``` * [Related settings]: ** init.el `(setq org-image-actual-width nil)` ** the org-mode file ``` #+ATTR_LATEX: :width 300pt [[file:20160802-142357_2016-08-02_13.35.28-1.jpg]] ``` I tried this with Emacs running in the safe mode, i.e. running with "-q" option. The inline image shows correctly (with the original size) until I set `org-image-actual-width` to `nil`, after which I don't see the image in the buffer (A big blank box appears where the image should be. I also see the errors mentioned above in the "*Messages*" buffer.). * [Current workaround I use]: It doesn't occur when I use the snippet in this SO answer. http://stackoverflow.com/questions/17637685/configuring-emacs-for-showing-fixed-width-inline-images It basically rewrites org-display-inline-images function. * [Environmental information]: ** (i) I built my Emacs using the following tool: https://github.com/renard/emacs-build-macosx by running `./build-emacs emacs-24.5`. It was built with ImageMagick, and I can correctly export LaTeX formula with it. Also it works fine when I don't use the resize feature, i.e. `org-image-actual-width` is set to `t`. ** (ii) Versions *** Emacs: emacs-24.5.50.1 *** Mac OS X: El Capitan 10.11.6(15G31). *** $ convert --version Version: ImageMagick 6.9.5-1 Q16 x86_64 2016-07-15 http://www.imagemagick.org Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Features: Cipher DPC Modules Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff webp xml zlib Thank you very much in advance. diadochos --94eb2c1246aad11227053912bf1b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

When I try to show i= nline images automatically resized in an org-mode buffer, the thumbnail doe= sn't show (a big blank box shows where the resized image should be) and= the following errors are echoed in the "*Messages*" buffer.

```
ImageMagick error: no decode delegate for thi= s image format `JPEG' @ error/constitute.c/ReadImage/504
```

The image types I have tried are JPG and PNG.
When tried with a PNG file, the error message changes to=C2=A0
```
ImageMagick error: no decode delegate for this ima= ge format `PNG' @ error/constitute.c/ReadImage/504
= ```

* [Related settings]:

** init.el

`= (setq org-image-actual-width nil)`

** the org-mode= file

```

#+ATTR_LATEX: := width 300pt

[[file:20160802-142357_2016-08-02_13.3= 5.28-1.jpg]]

```

I tried = this with Emacs running in the safe mode, i.e. running with "-q" = option.

The inline image shows correctly (with the= original size) until I set `org-image-actual-width` to `nil`, after which = I don't see the image in the buffer

=C2=A0(A b= ig blank box appears where the image should be. I also see the errors menti= oned above in the "*Messages*" buffer.).


=
* [Current workaround I use]:
It doesn't occur when I us= e the snippet in this SO answer.
It basically rewrites org-d= isplay-inline-images function.

* [Environmental in= formation]:
** (i) I built my Emacs using the following tool:
by running `./build-emacs e= macs-24.5`.
It was built with ImageMagick, and I can correctly ex= port LaTeX formula with it.
Also it works fine when I don't u= se the resize feature, i.e. `org-image-actual-width` is set to `t`.

** (ii) Versions
*** Emacs: =C2=A0emacs-24.5.50= .1
*** Mac OS X: El Capitan 10.11.6(15G31).

*** $ convert --version

Version: ImageMagick 6.9.5-1= Q16 x86_64 2016-07-15 http://www.im= agemagick.org

Copyright: Copyright (C) 199= 9-2016 ImageMagick Studio LLC

License: http://www.imagemagick.org/script/li= cense.php

Features: Cipher DPC Modules= =C2=A0

Delegates (built-in): bzlib = freetype jng jpeg ltdl lzma png tiff webp xml zlib


Thank you very much in advance.

=C2=A0 =C2=A0 diadochos

--94eb2c1246aad11227053912bf1b--