GNU bug report logs -
#47095
27.1; Feature request: mirror image display
Previous Next
Reported by: ynyaaa <at> gmail.com
Date: Fri, 12 Mar 2021 10:35:01 UTC
Severity: wishlist
Found in version 27.1
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 47095 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 28.12.2021 13:22, Alan Third wrote:
> On Mon, Dec 27, 2021 at 10:36:43AM +0200, Timo Taipalus wrote:
>> It seems image-mode does not have capability for image mirroring, so
>> here's a patch for it. Tested NS (macOS) and XRender/Cairo
>> implementations. As it is, it has no effect if ImageMagick is
>> enabled.
>
> I suspect this won't work at all on windows due to the way the
> transform is implemented there, but someone should probably check.
>
>> I chose 'h' as the action key because 'm' and 'f' were reserved, and
>> 'h' is easy to memorize ("horizontal").
>
> 'r' for reverse, maybe?
>
> Is it possible to do the mirroring before the rotation instead of as
> part of it? I feel like it would make the code a little clearer,
> although I suspect you're doing it in the rotation to reduce the
> number of calculations? Would it be possible to have both horizontal
> and vertical mirroring?
As said elsewhere, "r" is reserved for rotation. :)
I added an elisp function to do a vertical flip. Also I renamed the
procedure flipping because that's what GIMP calls it. Attached is a
revised patch to replace the previous one.
As for the C code, I agree it adds some complexity to the transform
function, but this is probably the fastest way to achieve it.
Flipping before rotation would lead to strange results when the image
has been rotated 90/270 degrees. Then the flip commands seem reversed
– horizontal flip actually flips vertically and vice versa. This is
because the transform function always rotates the initial image,
which is what would be flipped.
Hopefully someone can test this patch on Windows.
[0001-Add-support-for-image-flipping-Bug-47095.patch (text/x-diff, attachment)]
This bug report was last modified 2 years and 352 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.