emacs-devel
[Top][All Lists]
Advanced

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

Re: Image transformations


From: Eli Zaretskii
Subject: Re: Image transformations
Date: Sun, 16 Jun 2019 19:34:53 +0300

> Date: Sun, 16 Jun 2019 16:22:59 +0100
> From: Alan Third <address@hidden>
> Cc: address@hidden
> 
> The attached patch has more, hopefully better, documentation.

Thanks, see a few comments below.  Please push this regardless, it's a
huge improvement.

> > This is again a misunderstanding: I was merely suggesting to make all
> > of those multiplications in image_set_transform, that's all.
> 
> OK. Do you want me to go ahead and do that? I don’t want to start
> making big changes if you’re working on the Windows side. I have a
> suggestion that will simplify this job though.

Let me finish my attempts to use the matrix as-is, I have one more
attempt in queue.  After that, if I fail, moving the matrix
calculations into image_set_transform would be a necessity, as all the
alternatives I could think of are much uglier.

> In another part of this thread you pointed out that crop and image
> slices are doing basically the same thing. I hadn’t realised that.
> Given that that’s the case, I think we should just get rid of the crop
> function.

I agree, but please make sure the slices are indeed a 100% replacement
(I cannot yet do that because I don't have a working :crop support to
try it).

> I hope we can finish this off without any more misunderstandings.

Thanks, same here.

> +@item :crop @var{geometry}
> +This should be a list of the form @code{(@var{width} @var{height}
> +@var{x} @var{y})}.  @var{width} and @var{height} specify the width
> +and height of the cropped image.  If @var{x} is a positive number it
> +specifies the offset of the cropped area from the left of the original
> +image, and if negative the offset from the right. If @var{y} is a
> +positive number it specifies the offset from the top of the original
> +image, and if negative from the bottom. If @var{x} or @var{y} are
                                         ^^
One more space there.

> +       [x]   [m11 m12 tx]   [x']
> +       [y] X [m21 m22 ty] = [y']
> +       [1]   [  0   0  1]   [1 ]

Either we use a column vector, and it should be on the right of the
matrix; or we use a row vector, in which case it should be on the
left.  Which of these is the case?

> diff --git a/test/manual/image-transforms-tests.el 
> b/test/manual/image-transforms-tests.el
> new file mode 100644
> index 0000000000..d601b9397e
> --- /dev/null
> +++ b/test/manual/image-transforms-tests.el

This is great, but Windows only supports displaying images from files,
so we will have to write these specs to files, and then display them.

Thanks again for documenting this stuff.



reply via email to

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