Skip to content

Commit

Permalink
changed default image type from png to xpm
Browse files Browse the repository at this point in the history
  • Loading branch information
hayamiz committed Jan 10, 2010
1 parent eccce49 commit b28e832
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
6 changes: 4 additions & 2 deletions ChangeLog
Expand Up @@ -67,11 +67,13 @@
type of a given image.
(twittering-make-display-spec-for-icon): Now it receives image URL
as an argument.
(twittering-retrieve-image): Now it receives image URL
as an argument.
(twittering-retrieve-image): Now it receives image URL as an
argument.
(twittering-url-copy-file-async): delete
(twittering-retrieve-image-without-wget): delete
(twittering-retrieve-image-with-wget): delete
(twittering-retrieve-image): changed default image type from png
to xpm

* url-emacs21/*: add url library for emacs21

Expand Down
31 changes: 17 additions & 14 deletions twittering-mode.el
Expand Up @@ -1966,20 +1966,23 @@ following symbols;
(let ((image-type nil))
(with-temp-buffer
(set-buffer-multibyte nil)
(url-insert-file-contents image-url)
(setq image-type (twittering-image-type image-url
(current-buffer)))
(when (and twittering-convert-fix-size twittering-use-convert)
(call-process-region
(point-min) (point-max)
twittering-convert-program
t t nil
(format "%s:-" image-type) "-resize"
(format "%dx%d" twittering-convert-fix-size
twittering-convert-fix-size)
"png:-")
(setq image-type 'png))
(setq image-data `(,image-type . ,(buffer-string)))
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary)
(require-final-newline nil))
(url-insert-file-contents image-url)
(setq image-type (twittering-image-type image-url
(current-buffer)))
(when (and twittering-convert-fix-size twittering-use-convert)
(call-process-region
(point-min) (point-max)
twittering-convert-program
t t nil
(format "%s:-" image-type) "-resize"
(format "%dx%d" twittering-convert-fix-size
twittering-convert-fix-size)
"xpm:-")
(setq image-type 'xpm))
(setq image-data `(,image-type . ,(buffer-string))))
(puthash `(,image-url . ,twittering-convert-fix-size)
image-data
twittering-image-data-table))))
Expand Down

0 comments on commit b28e832

Please sign in to comment.