all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: 22172@debbugs.gnu.org
Subject: bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor
Date: Mon, 08 Feb 2016 18:25:46 +1100	[thread overview]
Message-ID: <87zivboe85.fsf@gnus.org> (raw)
In-Reply-To: <87bn7rya7o.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 08 Feb 2016 17:42:19 +1100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> And the new variable is called image-scaling-factor.

And this is now implemented, documented and pushed.  Feel free to tweak
the logic.  :-)

This defaults to 'auto, which means that it uses the dubious heuristic
"a character on a 'normal' screen is 10 pixels wide".

(defun image-compute-scaling-factor (scaling)
  (cond
   ((numberp image-scaling-factor)
    image-scaling-factor)
   ((eq image-scaling-factor 'auto)
    (let ((width (/ (float (window-width nil t)) (window-width))))
      ;; If we assume that a typical character is 10 pixels in width,
      ;; then we should scale all images according to how wide they
      ;; are.  But don't scale images down.
      (if (< width 10)
          1
        (/ (float width) 10))))
   (t
    (error "Invalid scaling factor %s" image-scaling-factor))))

I don't have any statistics to back that up, though.  Anybody have any
feelings on the "10" thing?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2016-02-08  7:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 22:59 bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor Lars Magne Ingebrigtsen
2015-12-14 23:09 ` John Wiegley
2015-12-23 16:50   ` Ted Zlatanov
2016-02-08  6:42   ` Lars Ingebrigtsen
2016-02-08  7:25     ` Lars Ingebrigtsen [this message]
2016-02-08 16:03       ` John Wiegley
2016-02-09  1:17       ` Lars Ingebrigtsen
2015-12-15  8:18 ` Glenn Morris
2016-02-08  6:43   ` Lars Ingebrigtsen
2016-02-08 15:12     ` Michael Heerdegen
2016-02-08 22:34       ` Lars Ingebrigtsen
2016-02-09  1:47         ` Lars Ingebrigtsen
2016-02-09  2:46           ` Drew Adams
2016-02-09  8:03             ` Michael Heerdegen
2016-02-09 13:18               ` Lars Ingebrigtsen
2016-02-09 13:29                 ` Lars Ingebrigtsen
2016-02-09 13:35                 ` Michael Heerdegen
2016-02-09 13:41                   ` Lars Ingebrigtsen
2016-02-09 13:50                     ` Michael Heerdegen
2016-02-09 14:08                       ` Lars Ingebrigtsen
2016-02-10  1:07                       ` Lars Ingebrigtsen
2016-02-10  2:05                         ` Lars Ingebrigtsen
2016-02-12 15:13                           ` Michael Heerdegen
2016-02-13  4:15                             ` Lars Ingebrigtsen
2016-02-16 20:57                               ` Michael Heerdegen
2016-02-19  6:40                                 ` Lars Ingebrigtsen
2016-02-19 11:51                                   ` Michael Heerdegen
2016-02-19 22:50                                     ` Lars Ingebrigtsen
2016-02-20 11:15                                       ` Michael Heerdegen
2016-02-24  7:13                                         ` Lars Ingebrigtsen
2016-02-24  8:28                                           ` John Wiegley
2016-02-19 20:57                         ` John Wiegley
2016-02-19 22:48                           ` Lars Ingebrigtsen
2016-02-09 15:26               ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zivboe85.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=22172@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.