From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Image transformations Date: Sat, 29 Jun 2019 14:55:56 +0300 Message-ID: <8336jshagj.fsf@gnu.org> References: <83o930y7cl.fsf@gnu.org> <20190615104242.GA13368@breton.holly.idiocy.org> <838su3w0de.fsf@gnu.org> <20190616152259.GA22789@breton.holly.idiocy.org> <83d0jdv68i.fsf@gnu.org> <20190617211332.GA55597@breton.holly.idiocy.org> <83a7e6na26.fsf@gnu.org> <20190625183352.GA18019@breton.holly.idiocy.org> <838stplcgb.fsf@gnu.org> <83v9wri0yd.fsf@gnu.org> <20190628183604.GA51376@breton.holly.idiocy.org> <83imsph4kj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="247557"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: alan@idiocy.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 29 13:57:03 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hhByZ-0012J1-8A for ged-emacs-devel@m.gmane.org; Sat, 29 Jun 2019 13:57:03 +0200 Original-Received: from localhost ([::1]:38940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhByY-00067B-7j for ged-emacs-devel@m.gmane.org; Sat, 29 Jun 2019 07:57:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60162) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhBxf-00066l-8u for emacs-devel@gnu.org; Sat, 29 Jun 2019 07:56:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hhBxe-0001ee-Vj; Sat, 29 Jun 2019 07:56:07 -0400 Original-Received: from [176.228.60.248] (port=3689 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hhBxe-0006lb-CJ; Sat, 29 Jun 2019 07:56:06 -0400 In-reply-to: <83imsph4kj.fsf@gnu.org> (message from Eli Zaretskii on Fri, 28 Jun 2019 22:50:52 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238234 Archived-At: > Date: Fri, 28 Jun 2019 22:50:52 +0300 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org > > > Date: Fri, 28 Jun 2019 19:36:04 +0100 > > From: Alan Third > > Cc: emacs-devel@gnu.org > > > > I tested before and after I moved the HAVE_NS checks and removed the > > inversion from nsimage.m and it all works, so I’d say you’ve done a > > good job. We may as well use the same calculations for W32 and NS. > > Great, thanks for testing. > > > > There's a FIXME in image_set_rotation, please tell what you think > > > about it. > > > > I think you’re probably right that we should throw an error there. > > OK, will add that. > > > > Please also comment on image-transforms-p. Maybe we should return > > > both 'rotate' and 'rotate90' in the list when ImageMagick is > > > available? > > > > Yes, we probably should. > > Will add. > > > My only concern is that there is no simple way to tell whether you > > should be using ‘:type imagemagick’ or not. There’s no automatic > > fallback between types. I know we want fallback in principal, but > > I’d imagined it done at the lisp level, and this function doesn’t > > help too much. > > This function is about the capabilities of a frame. AFAIK, in an > Emacs built with ImageMagick support we will use ImageMagick for > everything, unless the user somehow forces us not to, isn't that so? > If so, the function is correct disregarding the image library in use, > since if the caller wants a specific image library, that caller will > have to figure out on their own what transformations are available. > > > > +image_set_rotation (struct image *img, double *rotation) > > > > Should we rename this to compute_image_rotation to mirror > > compute_image_size? > > > > > +image_set_transform (struct frame *f, struct image *img, matrix3x3 matrix) > > > > I don’t think we need to pass this a matrix any more? > > Makes sense on both counts, will do. All done and pushed to the master branch. Thanks for the feedback.