Skip to content

Commit

Permalink
'twittering-retrieve-image-without-wget()' writes images as binary.
Browse files Browse the repository at this point in the history
  • Loading branch information
cvmat committed Dec 5, 2009
1 parent 6bbf2af commit 62a68ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Expand Up @@ -10,6 +10,8 @@
the external command `convert' should be used.
(twittering-make-display-spec-for-icon): new function for
generating properties for icon with/without cropping the image.
(twittering-retrieve-image-without-wget): write an image as binary
explicitly.

2009-12-04 Yuto Hayamizu <y.hayamizu@gmail.com>

Expand Down
11 changes: 6 additions & 5 deletions twittering-mode.el
Expand Up @@ -1326,11 +1326,12 @@ If STATUS-DATUM is already in DATA-VAR, return nil. If not, return t."
(unless (file-exists-p file)
(url-retrieve
url `(lambda (status)
(goto-char (point-min))
(search-forward-regexp "^$")
(goto-char (1+ (point)))
(delete-region (point-min) (point))
(write-file ,file)))
(let ((coding-system-for-write 'binary))
(goto-char (point-min))
(search-forward-regexp "^$")
(goto-char (1+ (point)))
(delete-region (point-min) (point))
(write-file ,file))))
))))

(defun twittering-retrieve-image-with-wget (image-urls)
Expand Down

0 comments on commit 62a68ab

Please sign in to comment.