emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing in images?


From: Stefan Monnier
Subject: Re: Drawing in images?
Date: Tue, 25 Aug 2009 21:07:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>  a) use clever already existing way, unknown to me, or
>  b) patch my imagemagic patch to support drawing operations within
>  images displayed in Emacs, or
>  c) non-existing way likelier to be accepted in Emacs, than b)?
> The use-case is displaying a scanned image and selecting a region for
> OCR, which will result in text that will later be processed in Emacs.
 
doc-view-set-slice-using-mouse would also like such a thing, so you can
view the rectangle to which you want to crop the document.

I don't think `a' exists (well, you can probably do it by running
ImageMagick somehow and/or construct an XPM or SVG data stream in Elisp,
... pretty messy and likely to be slow).

As for whether `b' or `c' would be preferred, it all depends: in
general, I'd prefer if it worked independently from the backend image
library, so `c' would be the favorite, but I might still prefer a clean
`b' than a messy `c'.
Maybe a good way to do it would be to allow stacking images (in your
case, the bottom one could use any image library, and the top one could
use SVG to draw the region boundary).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]