Moved octree-quantize to private, replacing original implementation of file/gif's quantize.
svn: r10996 original commit: ec408d0f24fc49cc23a44dc76a95aede781f70b4
This commit is contained in:
parent
25a200883b
commit
a21e815a1e
|
@ -4,8 +4,7 @@
|
||||||
scheme/class
|
scheme/class
|
||||||
scheme/list
|
scheme/list
|
||||||
net/gifwrite
|
net/gifwrite
|
||||||
scheme/contract
|
scheme/contract)
|
||||||
(prefix-in octree: file/octree-quantize))
|
|
||||||
|
|
||||||
(provide write-gif
|
(provide write-gif
|
||||||
write-animated-gif)
|
write-animated-gif)
|
||||||
|
@ -44,7 +43,7 @@
|
||||||
(let ([last-argb-thunk (last argb-thunks)])
|
(let ([last-argb-thunk (last argb-thunks)])
|
||||||
(for-each (lambda (argb-thunk)
|
(for-each (lambda (argb-thunk)
|
||||||
(let-values ([(pixels colormap transparent)
|
(let-values ([(pixels colormap transparent)
|
||||||
(octree:quantize (argb-thunk))])
|
(quantize (argb-thunk))])
|
||||||
(when (or transparent delay)
|
(when (or transparent delay)
|
||||||
(gif-add-control gif 'any #f (or delay 0) transparent))
|
(gif-add-control gif 'any #f (or delay 0) transparent))
|
||||||
(gif-add-image gif 0 0 w h #f colormap pixels)
|
(gif-add-image gif 0 0 w h #f colormap pixels)
|
||||||
|
@ -55,7 +54,7 @@
|
||||||
(gif-end gif))))
|
(gif-end gif))))
|
||||||
;; Build images and quantize all at once:
|
;; Build images and quantize all at once:
|
||||||
(let-values ([(pixels colormap transparent)
|
(let-values ([(pixels colormap transparent)
|
||||||
(octree:quantize (apply bytes-append (map (lambda (t) (t)) argb-thunks)))])
|
(quantize (apply bytes-append (map (lambda (t) (t)) argb-thunks)))])
|
||||||
(call-with-output-file*
|
(call-with-output-file*
|
||||||
filename
|
filename
|
||||||
(lambda (p)
|
(lambda (p)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user