X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-html.el;h=d0414e786014cc92a70aa3d6494ceb4da877f6f4;hb=8339220cc25db3fbdab4367d6252e596bddd9cb1;hp=732fcdda5a2598b6ef1f2b66d705797a357a61ca;hpb=7efe00a5135dd3a7efdc1ff38734476f1d33a616;p=gnus diff --git a/lisp/gnus-html.el b/lisp/gnus-html.el index 732fcdda5..d0414e786 100644 --- a/lisp/gnus-html.el +++ b/lisp/gnus-html.el @@ -266,7 +266,7 @@ Use ALT-TEXT for the image string." (setq tag (match-string 1) parameters (match-string 2) start (match-beginning 0)) - (when (plusp (length parameters)) + (when (> (length parameters) 0) (set-text-properties 0 (1- (length parameters)) nil parameters)) (delete-region start (point)) (when (search-forward (concat "") nil t) @@ -431,17 +431,19 @@ Return a string with image data." (= (car size) 30) (= (cdr size) 30)))) ;; Good image, add it! - (let ((image (gnus-html-rescale-image + (let ((image (gnus-rescale-image image - ;; (width . height) - (cons - ;; Aimed width - (truncate - (* gnus-max-image-proportion - (- (nth 2 edges) (nth 0 edges)))) - ;; Aimed height - (truncate (* gnus-max-image-proportion - (- (nth 3 edges) (nth 1 edges)))))))) + (let ((edges (gnus-window-inside-pixel-edges + (get-buffer-window (current-buffer))))) + ;; (width . height) + (cons + ;; Aimed width + (truncate + (* gnus-max-image-proportion + (- (nth 2 edges) (nth 0 edges)))) + ;; Aimed height + (truncate (* gnus-max-image-proportion + (- (nth 3 edges) (nth 1 edges))))))))) (delete-region start end) (gnus-put-image image alt-text 'external) (gnus-put-text-property start (point) 'help-echo alt-text)