Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c486dd96
Commit
c486dd96
authored
Dec 20, 2010
by
Julien Danjou
Committed by
Katsumi Yamaoka
Dec 20, 2010
Browse files
Revert "gnus-util: rewrite gnus-rescale-image".
parent
adc0b793
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+0
-5
lisp/gnus/gnus-util.el
lisp/gnus/gnus-util.el
+13
-8
No files found.
lisp/gnus/ChangeLog
View file @
c486dd96
...
...
@@ -14,11 +14,6 @@
* nnimap.el (nnimap-retrieve-headers): Remove CRLF from the headers.
2010-12-17 Julien Danjou <julien@danjou.info>
* gnus-util.el (gnus-rescale-image): Allow to resize images even if
they are from file. Can also scale up.
2010-12-17 Andrew Cohen <cohen@andy.bu.edu>
* gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore
...
...
lisp/gnus/gnus-util.el
View file @
c486dd96
...
...
@@ -1983,16 +1983,21 @@ empty directories from OLD-PATH."
"Rescale IMAGE to SIZE if possible.
SIZE is in format (WIDTH . HEIGHT). Return a new image.
Sizes are in pixels."
(
when
(
fboundp
'imagemagick-types
)
(
if
(
or
(
not
(
fboundp
'imagemagick-types
))
(
not
(
get-buffer-window
(
current-buffer
))))
image
(
let
((
new-width
(
car
size
))
(
new-height
(
cdr
size
)))
(
unless
(
=
(
cdr
(
image-size
image
t
))
new-height
)
(
setcdr
image
(
plist-put
(
cdr
image
)
:type
'imagemagick
))
(
setcdr
image
(
plist-put
(
cdr
image
)
:height
new-height
)))
(
unless
(
=
(
car
(
image-size
image
t
))
new-width
)
(
setcdr
image
(
plist-put
(
cdr
image
)
:type
'imagemagick
))
(
setcdr
image
(
plist-put
(
cdr
image
)
:width
new-width
)))))
image
)
(
when
(
>
(
cdr
(
image-size
image
t
))
new-height
)
(
setq
image
(
or
(
create-image
(
plist-get
(
cdr
image
)
:data
)
'imagemagick
t
:height
new-height
)
image
)))
(
when
(
>
(
car
(
image-size
image
t
))
new-width
)
(
setq
image
(
or
(
create-image
(
plist-get
(
cdr
image
)
:data
)
'imagemagick
t
:width
new-width
)
image
)))
image
)))
(
defun
gnus-list-memq-of-list
(
elements
list
)
"Return non-nil if any of the members of ELEMENTS are in LIST."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment