[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: image-transform.el and image-mode.el rewrite
From: |
Wolfgang Jenkner |
Subject: |
Re: image-transform.el and image-mode.el rewrite |
Date: |
Fri, 19 Jul 2013 13:52:16 +0200 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
On Fri, Jul 19 2013, Vitalie Spinu wrote:
> +;; these are 3, virtuly unchenged, objects from old image-mode.el
> +;; fixme: see the author
Hi!
> + ;; on GNU Emacs 24.3.50.4 (i686-pc-linux-gnu, X toolkit, Xaw
> + ;; scroll bars) of 2013-07-16, image width is slightly
> + ;; truncated, ~6px, so the below mambo math for .5px
> + ;; adjustment is pretty useless.
The rotation stuff is written in such a a way that fit-width
(resp. fit-height) produces a rotated image whose bounding-box, with the
roundings applied by ImageMagick, viz.
> +;; geometry.x = (ssize_t) floor(min.x-0.5);
> +;; geometry.y = (ssize_t) floor(min.y-0.5);
> +;; geometry.width=(size_t) ceil(max.x-geometry.x+0.5);
> +;; geometry.height=(size_t) ceil(max.y-geometry.y+0.5);
has _exactly_ the desired pixel width (resp. height), and there's an
assertion in image-mode which tests this.
So, except for this
> +(defvar image--right-angle-fudge 0.0001
> + "Snap distance to a multiple of a right angle.
> +There's no deep theory behind the default value, it should just
> +be somewhat larger than ImageMagick's MagickEpsilon.")
everything is exact math without fudge factors.
In particular, thing's won't be quite correct if you do
> + ;; VS[16-07-2013]: returning (w . h) is unnecessary, it
> + ;; distorts the image and processing becomes very slow
Wolfgang
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, (continued)
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, Stefan Monnier, 2013/07/16
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, Vitalie Spinu, 2013/07/17
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, Vitalie Spinu, 2013/07/17
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, Lars Magne Ingebrigtsen, 2013/07/18
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, Vitalie Spinu, 2013/07/18
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, Stefan Monnier, 2013/07/19
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, Vitalie Spinu, 2013/07/20
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, Vitalie Spinu, 2013/07/22
- Re: imagemagic in image-mode and image-dired-thumbnail-mode?, Lars Magne Ingebrigtsen, 2013/07/22
- image-transform.el and image-mode.el rewrite, Vitalie Spinu, 2013/07/18
- Re: image-transform.el and image-mode.el rewrite,
Wolfgang Jenkner <=
- Re: image-transform.el and image-mode.el rewrite, Wolfgang Jenkner, 2013/07/19
- Re: image-transform.el and image-mode.el rewrite, Vitalie Spinu, 2013/07/20
- Re: image-transform.el and image-mode.el rewrite, Glenn Morris, 2013/07/22
- Re: image-transform.el and image-mode.el rewrite, Vitalie Spinu, 2013/07/22