unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* iimage.el and the size of the images
@ 2016-05-03 12:32 Uwe Brauer
  2016-05-03 14:41 ` Michael Heerdegen
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2016-05-03 12:32 UTC (permalink / raw)
  To: emacs-devel


Hello

I just learn about iimage.el, which is now part of GNU emacs core. I
like it quite a lot, the only thing which I find a bit inconvenient on
my 12 inch Laptop is the size of the images displayed. I did not find
any variable in which the size of images could be changed.


The author's address does not work anymore, so I looked at the code it
seems that the essential part is this:

  (if arg
                  (add-text-properties (match-beginning 0) (match-end 0)
                                       `(display ,(create-image file)
                                                  ^^^^^
                                         modification-hooks
                                         (iimage-modification-hook)))
            

Now I checked that function and its documentation says
,----
| 
| create-image is an autoloaded compiled Lisp function in ‘image.el’.
| (create-image FILE-OR-DATA &optional TYPE DATA-P &rest PROPS)
| Create an image.
| ....
| Images should not be larger than specified by ‘max-image-size’.
`----


However 
,----
| max-image-size is a variable defined in ‘C source code’.
| Its value is 10.0
`----

So I cannot change that value easily. Anybody has an idea how to change
the size of the displayed images?

thanks

Uwe Brauer 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iimage.el and the size of the images
  2016-05-03 12:32 iimage.el and the size of the images Uwe Brauer
@ 2016-05-03 14:41 ` Michael Heerdegen
  2016-05-03 15:49   ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Heerdegen @ 2016-05-03 14:41 UTC (permalink / raw)
  To: emacs-devel; +Cc: Lars Ingebrigtsen

Uwe Brauer <oub@mat.ucm.es> writes:

> I just learn about iimage.el, which is now part of GNU emacs core. I
> like it quite a lot, the only thing which I find a bit inconvenient on
> my 12 inch Laptop is the size of the images displayed. I did not find
> any variable in which the size of images could be changed.

> The author's address does not work anymore, so I looked at the code it
> seems that the essential part is this:

>   (if arg
>                   (add-text-properties (match-beginning 0) (match-end 0)
>                                        `(display ,(create-image file)
>                                                   ^^^^^
>                                          modification-hooks
>                                          (iimage-modification-hook)))
            


Lars Ingebrigtsen has been working in that area recently.  He installed
some patches that made scaling displayed images very easy (in the master
branch AFAIK).

Lars, do your patches affect iimage.el as well - or should they?


> However 
> ,----
> | max-image-size is a variable defined in ‘C source code’.
> | Its value is 10.0
> `----
>
> So I cannot change that value easily.

Why not?  Doesn't `setq' change the value?

However, I'm not sure what this variable really means (I don't
understand the docstring).


Michael.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iimage.el and the size of the images
  2016-05-03 14:41 ` Michael Heerdegen
@ 2016-05-03 15:49   ` Uwe Brauer
  2016-05-03 16:00     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2016-05-03 15:49 UTC (permalink / raw)
  To: emacs-devel


    > Uwe Brauer <oub@mat.ucm.es> writes:


            


    > Lars Ingebrigtsen has been working in that area recently.  He installed
    > some patches that made scaling displayed images very easy (in the master
    > branch AFAIK).

I have a relative recent version of 25.1.50 installed (but not the most
recent because of the changes in vc-hg.el). Not sure whether these
patches are in there. 

    > Lars, do your patches affect iimage.el as well - or should they?



    > Why not?  Doesn't `setq' change the value?

Ok, my bad it does, but it does not have any effect, so I presumed
values defined in C, cannot be changed in lisp or if that does not have
any effect. That might be wrong but on a practical level the variable
does not  help.


    > However, I'm not sure what this variable really means (I don't
    > understand the docstring).


Nor do I

Uwe 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iimage.el and the size of the images
  2016-05-03 15:49   ` Uwe Brauer
@ 2016-05-03 16:00     ` Lars Ingebrigtsen
  2016-05-03 16:22       ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2016-05-03 16:00 UTC (permalink / raw)
  To: emacs-devel

Uwe Brauer <oub@mat.ucm.es> writes:

> Ok, my bad it does, but it does not have any effect, so I presumed
> values defined in C, cannot be changed in lisp or if that does not have
> any effect. That might be wrong but on a practical level the variable
> does not  help.

No, that variable is just a sanity check kinda thing and has nothing to
do with the iimage problem.  iimage just lacks a way to scale the
images, and it should have.  Report the problem with `M-x
report-emacs-bug' and somebody will probably implement it at some
point...

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iimage.el and the size of the images
  2016-05-03 16:00     ` Lars Ingebrigtsen
@ 2016-05-03 16:22       ` Uwe Brauer
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2016-05-03 16:22 UTC (permalink / raw)
  To: emacs-devel

>>> "Lars" == Lars Ingebrigtsen <larsi@gnus.org> writes:

   > Uwe Brauer <oub@mat.ucm.es> writes:
   >> Ok, my bad it does, but it does not have any effect, so I presumed
   >> values defined in C, cannot be changed in lisp or if that does not have
   >> any effect. That might be wrong but on a practical level the variable
   >> does not  help.

   > No, that variable is just a sanity check kinda thing and has nothing to
   > do with the iimage problem.  iimage just lacks a way to scale the
   > images, and it should have.  Report the problem with `M-x
   > report-emacs-bug' and somebody will probably implement it at some
   > point...

I'll do, but the code Michael mentioned, cannot be simply used?




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-03 16:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03 12:32 iimage.el and the size of the images Uwe Brauer
2016-05-03 14:41 ` Michael Heerdegen
2016-05-03 15:49   ` Uwe Brauer
2016-05-03 16:00     ` Lars Ingebrigtsen
2016-05-03 16:22       ` Uwe Brauer

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).