unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Several suggestions for image support
Date: 16 Apr 2004 12:06:27 +0200	[thread overview]
Message-ID: <x5d668p78c.fsf@lola.goethe.zz> (raw)
In-Reply-To: <m3hdvk8boq.fsf@kfs-l.imdomain.dk>

storm@cua.dk (Kim F. Storm) writes:

> David Kastrup <dak@gnu.org> writes:
> 
> > PNG images support transparency.  Emacs can't make use of it.  You can
> > only have Emacs declare a particular color as transparent.  This is
> > dissatisfactory.  It should tell the PNG decoding routines Emacs'
> > background color for the purpose of transparency.
> 
> Using `:mask heuristic' should make the image background transparent.
> The tool-bar code uses this.
> 
> I suppose you know that, so what's the problem with this approach?

That it does not work.  It only works when the majority of corner
pixels has the transparent color.  Also it is impossible for an image
to have, say, both white and transparent color.

Since transparency is a feature of PNG files, is there any particular
reason not to just use the information, preferring some heuristic
hack to it that does not work in all circumstances?

> > I would find it important if an image specifier could restrict the
> > displayed portion of an image.
> 
> This might be useful for other reasons, e.g. image panning.
> Zoom (scaling) would be useful too.
> 
> > The reason is that large images always appear as a single big
> > character to Emacs.  If I could split such an image into a bunch of
> > smaller images, I could walk through it with the cursor.  But it
> > should only be necessary to instantiate the complete image itself once
> > for this purpose.  Of course, one should find a way that does not
> > cause all of the subimages to be entered separately into the image
> > cache.
> 
> Something like this is already on my to-do list.
> 
> However, I have other ideas to make image scrolling work, and it
> is at the top of my to-do list.

This is not mainly for making image scrolling work (it would be quite
overkill for that).  This is to split an image into addressable
items.  For example, preview-latex will turn a tabular into one large
graphic.  If I click on that graphic at a particular point, the whole
graphic dissolves into text and the cursor is positioned at the start
of the tabular.  This is pretty useless if the table is large because
you still have to find your point.

If instead just the table cell opened and the cursor would be
positioned there, one could use this for serious table editing.
Since the whole table is available as one graphic, loading hundreds
of separate images would be inconvenient.  It is conceivable to split
the image within TeX and load it as separate graphics.  However, the
involved complexity is far greater if I want to keep the alignment
intact.

It would also mean that I could walk the cursor through _rows_ of the
preview-latex image instead of having to walk through it all at
once.  Image scrolling is a different problem: it does not involve
actually changing the value of point.

Of course, a different possibility would be to just display one image,
but have a way of walking the cursor display across it.  This would
have the advantage that the table would have its optical integrity
preserved (no line spacing between rows of the table), and the
disadvantage that you could only open the whole table at once into
text, not just a cell in between.

It would probably be nice to have a way of tiling an image into areas
with individual property lists (posn-point, keymap,
mouse-highlighting...).  But that's just phantasizing for the future.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  parent reply	other threads:[~2004-04-16 10:06 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-16  0:21 Several suggestions for image support David Kastrup
2004-04-16  9:29 ` YAMAMOTO Mitsuharu
2004-04-16 14:02   ` Kim F. Storm
2004-04-16 12:50     ` Jason Rumney
2004-04-16 16:59       ` Kim F. Storm
2004-04-16 15:18         ` Jason Rumney
2004-04-16 10:22 ` Kim F. Storm
2004-04-16  9:09   ` Jason Rumney
2004-04-16 10:06   ` David Kastrup [this message]
2004-04-16 12:38     ` Kim F. Storm
2004-04-16 11:09       ` Jason Rumney
2004-04-16 11:34         ` David Kastrup
2004-04-16 12:29           ` Jason Rumney
2004-04-16 12:56             ` David Kastrup
2004-04-16 17:08         ` Kim F. Storm
2004-04-16 13:39     ` Stefan Monnier
2004-04-16 13:49       ` David Kastrup
2004-04-17  7:16 ` Richard Stallman
2004-04-17 13:02   ` Werner LEMBERG
2004-04-17 19:24     ` David Kastrup
2004-04-17 18:03   ` David Kastrup
2004-04-18 21:30     ` Kim F. Storm
2004-04-19  1:51       ` Stefan Monnier
2004-04-19  7:57         ` David Kastrup
2004-04-19 10:34           ` Kim F. Storm
2004-04-19 14:29             ` Stefan Monnier
2004-04-19 15:17               ` David Kastrup
2004-04-19 15:37                 ` Stefan Monnier
2004-04-19 15:56         ` Kim F. Storm
2004-04-19 14:15           ` David Kastrup
2004-04-19 21:59             ` Kim F. Storm
2004-04-21  0:53         ` Kim F. Storm
2004-04-21  1:08 ` Kim F. Storm
2004-04-20 23:31   ` David Kastrup
2004-04-21  3:04     ` Piet van Oostrum
2004-04-22  0:43       ` Kim F. Storm
2004-04-22  1:18         ` YAMAMOTO Mitsuharu
2004-04-22 22:03           ` Piet van Oostrum
2004-04-23  4:02             ` YAMAMOTO Mitsuharu
2004-04-24 14:48               ` Piet van Oostrum
2004-04-21 10:10     ` Kim F. Storm
2004-04-21  8:51       ` David Kastrup
2004-04-21 12:51         ` Kim F. Storm
2004-04-22 17:40       ` Richard Stallman
2004-04-22 18:17         ` David Kastrup
2004-04-24 14:26           ` Richard Stallman
2004-04-22 23:53         ` Kim F. Storm
2004-04-22 23:02           ` David Kastrup
2004-04-23 12:36             ` Kim F. Storm
2004-04-23 15:02             ` Stefan Monnier
2004-04-23 15:05               ` David Kastrup
2004-04-23  0:33           ` Kenichi Handa
2004-04-23  0:51             ` David Kastrup
2004-04-23 12:58               ` Kenichi Handa
2004-04-23 14:53                 ` David Kastrup
2004-04-24 14:27               ` Richard Stallman
2004-04-24 15:16                 ` David Kastrup
2004-04-25  1:56             ` Kim F. Storm
2004-04-25  2:06               ` David Kastrup
2004-04-26  9:38                 ` Kim F. Storm
2004-04-27  0:34                   ` Kim F. Storm
2004-04-26 22:50                     ` David Kastrup
2004-04-27  1:30                       ` Miles Bader
2004-04-27  9:30                         ` Kim F. Storm
2004-04-27 13:22                           ` David Kastrup
2004-04-27 14:00                             ` David Kastrup
2004-04-28 10:12                               ` Richard Stallman
2004-04-28 10:58                                 ` David Kastrup
2004-04-29  0:29                                   ` Kim F. Storm
2004-04-28 22:52                                     ` David Kastrup
2004-04-29 13:31                                   ` Richard Stallman
2004-04-29  2:06                     ` Kenichi Handa
2004-04-29 10:00                       ` Kim F. Storm
2004-04-30  1:54                         ` Kenichi Handa
2004-04-29  2:20               ` Kenichi Handa
2004-04-25 18:09           ` Richard Stallman
2004-04-29  0:17             ` Kim F. Storm
2004-04-28 23:02               ` David Kastrup
2004-04-29  9:51                 ` Kim F. Storm
2004-04-29  8:08                   ` David Kastrup
2004-04-29 11:24                     ` Kim F. Storm
2004-04-30  1:07                 ` Kim F. Storm
2004-04-30 11:31                   ` David Kastrup
2004-04-30 14:21                     ` Kim F. Storm
2004-04-30 13:30                       ` David Kastrup
2004-04-30 13:49                       ` preview-latex in Emacs (was: Several suggestions for image support) Stefan Monnier
2004-05-01  9:44                   ` Several suggestions for image support Richard Stallman
2004-05-01 19:56                     ` Kim F. Storm
2004-05-02 19:52                       ` Richard Stallman
2004-05-03  9:19                         ` David Kastrup
2004-04-30  9:02               ` Richard Stallman
2004-04-30 11:27                 ` David Kastrup
2004-04-30 14:19                   ` Kim F. Storm
     [not found]   ` <E1BGiB8-00087H-Tz@fencepost.gnu.org>
     [not found]     ` <x5brljkgk5.fsf@lola.goethe.zz>
2004-04-22 23:32       ` Kim F. Storm
2004-04-22 21:50         ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5d668p78c.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).