Skip to content

Commit

Permalink
Merge pull request #22 from miz999/thumbnail-identify-bugfix
Browse files Browse the repository at this point in the history
Thumbnail identify bugfix(再送)
  • Loading branch information
naota committed Jul 23, 2012
2 parents b3c4241 + 85b1917 commit f96dc62
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

2012-06-18 MIZUNUMA Yuto <mizmiz@sf.net>

* navi2ch-thumbnail.el (navi2ch-thumbnail-image-jpeg-identify):
SOF2で画像サイズ取得
(navi2ch-thumbnail-image-identify): filereadサイズで無限ループに入っていた

* navi2ch-oyster.el (navi2ch-oyster-login): ID取得エラー表示の簡素化と厳密化
インデントの整理

Expand Down
20 changes: 9 additions & 11 deletions navi2ch-thumbnail.el
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,7 @@
((= code #xffc4))
;; APP
((and (>= code #xffe0) (<= code #xffed)))
;; SOF2
((= code #xffc2))
;; SOF0 DCT
;; SOF0(baseline) or SOF2(progressive)
((and (>= code #xffc0) (<= code #xffcF))
(let ((sample (aref data (+ i 4)))
(ysize (+ (lsh (aref data (+ i 5)) 8)
Expand Down Expand Up @@ -717,15 +715,15 @@
(if rtn (throw 'identify rtn)))

;; $B>pJs$,<hF@$G$-$J$+$C$?>l9g$O%X%C%@$r$5$i$KFI$_9~$`(B
(setq size (* size 10))
(if (> size file-size)
(setq size file-size))
; (message "navi2ch-thumbnail-image-identify:re-read size=%s %s" size file)
(setq rtn (navi2ch-thumbnail-image-identify file size))
(if rtn (throw 'identify rtn))
(when (not (= size file-size))
(setq size (* size 10))
(if (> size file-size)
(setq size file-size))
(setq rtn (navi2ch-thumbnail-image-identify file size))
(if rtn (throw 'identify rtn)))

;; $B$=$l$G$bL5M}$J$i30It%W%m%0%i%`$KMj$k(B
(when (and (= size file-size)
navi2ch-thumbnail-image-identify-program)
(when navi2ch-thumbnail-image-identify-program
(message "identify called %s" file)
(with-temp-buffer
(cond
Expand Down

0 comments on commit f96dc62

Please sign in to comment.