GNU bug report logs - #48415
Subject: 27.2; Add filter-to-png support for user defined image formats

Previous Next

Package: emacs;

Reported by: Dov Grobgeld <dov.grobgeld <at> gmail.com>

Date: Fri, 14 May 2021 09:08:01 UTC

Severity: normal

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48415 in the body.
You can then email your comments to 48415 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#48415; Package emacs. (Fri, 14 May 2021 09:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dov Grobgeld <dov.grobgeld <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 14 May 2021 09:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dov Grobgeld <dov.grobgeld <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Subject: 27.2;
 Add filter-to-png support for user defined image formats
Date: Fri, 14 May 2021 12:07:07 +0300
--
This is a feature request and not a bug.

Background

Within org-mode I often reference external image resources of
hand drawn sketches that were drawn with the program krita. These
have the extension kra.  Internally this file format is a zip
file, with one of the entries being the image mergedimage.png . I
would like to display such kra images in emacs inline, just like
emacs can display any referenced png files.

Another similar format is the OpenRaster file format (which is
also a zip file with an embedded mergedimage.png), which by
default has the extension .ora.

Suggestion

I suggest that the inline image display in emacs will
be "extended" with a list of "filter functions" that map from a
user define file extension- to a function that extracts and
produces a png file. With such support it becomes trivial to
support inline display of kra and ora files by writing a function
that extracts the mergedimage.png from the zip file and supplies
it to emacs.

--


In GNU Emacs 27.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
3.24.27, cairo version 1.17.4)
 of 2021-03-27 built on buildvm-x86-25.iad2.fedoraproject.org
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Fedora 34 (Workstation Edition)

Recent messages:

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz
 --with-cairo --with-json build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2
 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  xmsi-mode: t
  show-paren-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-magit-file-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  shell-dirtrack-mode: t
  async-bytecomp-package-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:

Features:
(shadow sort mail-extr emacsbug org-clock org-agenda dabbrev mule-util
cal-move ox-beamer rfc2104 tramp-cache misearch multi-isearch winner
helm-command helm-elisp helm-eval edebug helm-info helm-mode helm-files
image-dired dired-x dired-aux ffap helm-buffers helm-tags helm-locate
helm-grep wgrep-helm helm-regexp helm-utils helm-types helm-help helm
helm-source eieio-compat helm-multi-match helm-lib wdired web-mode
mhtml-mode css-mode smie eww mm-url url-queue color js sgml-mode htmlize
.loaddefs el-get el-get-autoloading el-get-list-packages
el-get-dependencies el-get-build el-get-status el-get-methods
el-get-fossil el-get-svn el-get-pacman el-get-github-zip
el-get-github-tar el-get-http-zip el-get-http-tar el-get-hg el-get-go
el-get-git-svn el-get-fink el-get-emacswiki el-get-http el-get-notify
el-get-emacsmirror el-get-github el-get-git el-get-elpa el-get-darcs
el-get-cvs el-get-bzr el-get-brew el-get-builtin el-get-apt-get
el-get-recipes el-get-byte-compile el-get-custom el-get-core autoload
radix-tree lisp-mnt org-table xmsi-math-symbols-input face-remap org-man
screenshot ox-slidy ox-s5 org-bullets org-wikipedia org-jira-hyperlink
org-redmine-hyperlink org-comeet-hyperlink org-git-hyperlink org-eww
org-rmail org-mhe org-irc org-info org-gnus nnir org-docview doc-view
image-mode exif org-bibtex bibtex org-bbdb org-w3m paren cus-start
cus-load zoom-frm frame-cmds frame-fns avoid js-doc iswitchb google-look
qtdoc git-find-file ob-lua ob-C cc-mode cc-fonts cc-guess cc-menus
cc-styles cc-align ob-R ob-octave matlab gud ob-plantuml ob-asymptote
ob-dot ob-ditaa ob-python ob-perl ob-shell python-mode info-look
tramp-sh hippie-exp flymake-proc flymake ert ewoc debug backtrace
cc-cmds cc-engine cc-vars cc-defs persistent iimage org-crypt
load-theme-buffer-local ox-reveal ox-mediawiki ox-odt rng-loc rng-uri
rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii
ox-publish ox s dmacro tramp tramp-loaddefs trampver tramp-integration
tramp-compat ls-lisp pdf-loader color-moccur dired-details+
dired-details sourcepair tempo xml-parse doxymacs ack epa-file files-x
jka-compr yasnippet visual-regexp-steroids visual-regexp pcre2el rxt
re-builder pydoc org-element avl-tree generator org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint ob-keys
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob-core ob-eval org-compat org-macs cal-menu
calendar cal-loaddefs gnus-sum shr svg dom gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader
goto-addr browse-kill-ring pretty-mode wgrep grep compile ein-loaddefs
org-loaddefs magit-bookmark bookmark pp magit-imenu git-rebase
magit-extras magit-ediff ediff ediff-merg ediff-mult ediff-wind
ediff-diff ediff-help ediff-init ediff-util magit-subtree
magit-submodule magit-obsolete magit-blame magit-stash magit-bisect
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-collab magit-files
magit-refs magit-status magit magit-repos magit-apply magit-wip
magit-log which-func imenu magit-diff smerge-mode diff magit-core
magit-autorevert autorevert filenotify magit-process magit-margin
magit-mode git-commit recentf tree-widget magit-git magit-section
magit-utils vc-git diff-mode ido crm log-edit message rfc822 mml mml-sec
epa epg epg-config gnus-util rmail rmail-loaddefs text-property-search
time-date mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader
pcvs-util add-log ghub url-http mail-parse rfc2231 url-gw nsm rmc puny
url-auth url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap magit-popup format-spec
with-editor cl-extra warnings term disp-table ehelp eshell esh-cmd
esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util
dired dired-loaddefs shell pcomplete comint server sticky-w
init-flycheck flycheck ansi-color find-func help-mode rx init-ssh-agency
ssh-agency init-telega telega telega-info telega-chat telega-msg
telega-root derived telega-filter wid-edit telega-server
telega-customize telega-core ring init-helm helm-config helm-easymenu
async-bytecomp async pcase init-multiple-cursors multiple-cursors
mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more thingatpt
mc-cycle-cursors mc-edit-lines multiple-cursors-core easy-mmode edmacro
kmacro advice rect finder-inf info smtpmail sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils dash cl clang-rename
clang-include-fixer let-alist clang-format xml package easymenu
browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting xwidget-internal cairo move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 1625465 106870)
 (symbols 48 64815 5)
 (strings 32 244674 9774)
 (string-bytes 1 8227842)
 (vectors 16 70177)
 (vector-slots 8 1728176 257632)
 (floats 8 536 239)
 (intervals 56 31987 664)
 (buffers 1000 36))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48415; Package emacs. (Sun, 31 Oct 2021 15:06:02 GMT) Full text and rfc822 format available.

Message #8 received at 48415 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Dov Grobgeld <dov.grobgeld <at> gmail.com>
Cc: 48415 <at> debbugs.gnu.org
Subject: Re: bug#48415: Subject: 27.2; Add filter-to-png support for user
 defined image formats
Date: Sun, 31 Oct 2021 08:04:55 -0700
Dov Grobgeld <dov.grobgeld <at> gmail.com> writes:

> This is a feature request and not a bug.
>
> Background
>
> Within org-mode I often reference external image resources of
> hand drawn sketches that were drawn with the program krita. These
> have the extension kra.  Internally this file format is a zip
> file, with one of the entries being the image mergedimage.png . I
> would like to display such kra images in emacs inline, just like
> emacs can display any referenced png files.
>
> Another similar format is the OpenRaster file format (which is
> also a zip file with an embedded mergedimage.png), which by
> default has the extension .ora.
>
> Suggestion
>
> I suggest that the inline image display in emacs will
> be "extended" with a list of "filter functions" that map from a
> user define file extension- to a function that extracts and
> produces a png file. With such support it becomes trivial to
> support inline display of kra and ora files by writing a function
> that extracts the mergedimage.png from the zip file and supplies
> it to emacs.

Thanks for the bug report.

Could you send an example .kra image file and .ora image file?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48415; Package emacs. (Tue, 12 Jul 2022 23:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 48415 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dov Grobgeld <dov.grobgeld <at> gmail.com>
Cc: 48415 <at> debbugs.gnu.org
Subject: Re: bug#48415: Subject: 27.2; Add filter-to-png support for user
 defined image formats
Date: Wed, 13 Jul 2022 01:37:39 +0200
Dov Grobgeld <dov.grobgeld <at> gmail.com> writes:

> I suggest that the inline image display in emacs will
> be "extended" with a list of "filter functions" that map from a
> user define file extension- to a function that extracts and
> produces a png file. 

I've now added support for this in Emacs 29 via
`image-converter-add-handler'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 48415 <at> debbugs.gnu.org and Dov Grobgeld <dov.grobgeld <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 12 Jul 2022 23:38:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Aug 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.