From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: :max-width/:max-height Date: Fri, 21 Jun 2013 12:29:05 +0200 Message-ID: References: <837ghnokij.fsf@gnu.org> <83zjujn4r2.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371810563 22855 80.91.229.3 (21 Jun 2013 10:29:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Jun 2013 10:29:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 21 12:29:24 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Upyaq-000785-6F for ged-emacs-devel@m.gmane.org; Fri, 21 Jun 2013 12:29:24 +0200 Original-Received: from localhost ([::1]:37409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upyap-00079l-P6 for ged-emacs-devel@m.gmane.org; Fri, 21 Jun 2013 06:29:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upyal-00079g-07 for emacs-devel@gnu.org; Fri, 21 Jun 2013 06:29:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upyai-0004Rh-Ls for emacs-devel@gnu.org; Fri, 21 Jun 2013 06:29:18 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:36079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upyai-0004RP-Fe; Fri, 21 Jun 2013 06:29:16 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UpyaX-0004jy-Lh; Fri, 21 Jun 2013 12:29:05 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEWWRC3p2Nf7+fwlAgw9 DRW5eExnHh9+Lyefw+PHAAACd0lEQVQ4jZ2SwW7bMAyGWcSyrlWxtGfvCQpIda8BrMpXBZjiqwcr 1FVDbOn1R8ld1x16GQNEjj7+/EnG8P2LgP8H3cPHnfgK2H/A/fkDTA+fQLf+/CPpjuITePJX8dCV G0HRdeIdiFabs3iPY/mqgM6DlOz9ShzPFXT110HJNyH4Vp7drwLoLAk3uD2LJ0x3JLimCo7O0TlA 04tVa5LdBzwX8MgCZUnumVhjJqNvZrgr4N4W5RJvZ/EDi+Jx9Hd7qUwK1VDaRXkqcsGVOQfiKb2J o1Z+iM7NcHZuGhPqgUrhi/gh6fG2OUTnHG/mZDQI27y4m9RS+pcLdeVc8lqjhinaZRskRerBq5lN ejBv3IA9ZQ8VDMooPYYIlk2gwa39zA6yhlLc68wss3EFN/Wz28GYTq71vICtAdeisxUoxh1zDZ+b MWwcAE8WUgHPFoDyLtSUTBwiMpvaCqBGI8fTEgOEv4DkwKANMHO2gn6F5H313hU8wpWzBqTUw95s v99nUrTsAFLVdII9a0xBIc55O4ChnFtFr1euZwKJFHGh2QGGvoI1YAGRbZAXkCdKeS31+sYMBgMw O4NdQGVoxrGsXTWyp78ok0tICWLIQRtpCKyDWfWA6HWYNGiJi0T6ENAmQhNyJgGCVkoqlIrs12LN kYjXCG2RVg+5htKsxnKTqDtiZgcmZhqcdpIRy6gFlPEz0g7LriDPuYCMWnraSUj08kCbc07XCnhR DFKHZJljbSCTawtgOSkU+SEm6whkzDinWsoPBIzHUsq1mcy3di9VAO7AriHmXBWcp0+A3ppApdaq SEtfgCHAysSI814qeYOaQMtY9aB+4TfvSvVVyN0C/AAAAABJRU5ErkJggg== X-Now-Playing: Jonas Kullhammar Quartet's _The Half Naked Truth 1998-2008 (1)_: "For X" X-Hashcash: 1:23:130621:emacs-devel@gnu.org::oPYolYGjqPGk1Ouy:000000000000000000000000000000000000000000BPxI X-Hashcash: 1:23:130621:eliz@gnu.org::krfMaUkCAzWqDYND:00001WfR/ In-Reply-To: <83zjujn4r2.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Jun 2013 13:21:37 +0300") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-MailScanner-ID: 1UpyaX-0004jy-Lh MailScanner-NULL-Check: 1372415345.76071@M27arqKxkcq6omtTJoVP/w X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160819 Archived-At: Eli Zaretskii writes: > Can you show a pseudo-code that would illustrate the idea? (put-image (create-image "/tmp/foo.png" nil nil :max-width (frame-width) :max-height (frame-height))) The tedious bit about the computation is finding out whether to use the max-width or the max-height when computing the width and height to use. (We want to keep the aspect ratio.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/