Skip to content

Commit

Permalink
Tweak progressive-callback a little
Browse files Browse the repository at this point in the history
  • Loading branch information
lehitoskin committed Apr 19, 2017
1 parent ae28e77 commit 2c28d64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@
(send bitmap set-argb-pixels 0 0 width height pixels)
bitmap))

(define (progressive-callback info-struct user-data)
(define quality (callback-info-t-quality info-struct))
(define (progressive-callback quality bytes-read decode-over? user-data context)
(flif-decoder-generate-preview context)
(define lst (flif->list (decoder)))
(set! image-bmp-master (first lst))
(cond [(and (want-animation?) (> (length lst) 1))
Expand Down Expand Up @@ -732,7 +732,7 @@
;(set-box! flif-load-progress 0)
; progressive decoding
;(flif-decoder-set-callback! (decoder) progressive-callback #f)
;(flif-decoder-set-first-callback-quality! (decoder) 10000)
;(flif-decoder-set-first-callback-quality! (decoder) 5000)
; regular decoding
(flif-decoder-decode-file! (decoder) img)
(define lst (flif->list (decoder)))
Expand Down

0 comments on commit 2c28d64

Please sign in to comment.