|
@@ -213,7 +213,9 @@
|
|
|
(define (magick-alpha-channel-options)
|
|
|
(alpha-channel-list))
|
|
|
|
|
|
-(define* (magick-convert-image image-bytes #:key format alpha-channel)
|
|
|
+(define* (magick-convert-image image-bytes #:key
|
|
|
+ format
|
|
|
+ alpha-channel)
|
|
|
(call-with-magick-wand
|
|
|
(lambda (wand)
|
|
|
(MagickReadImageBlob* wand image-bytes)
|
|
@@ -224,16 +226,18 @@
|
|
|
(MagickGetImageBlob* wand))))
|
|
|
|
|
|
(define* (magick-create-image #:key width height
|
|
|
- (format "PNG")
|
|
|
- (background-color "white")
|
|
|
- (background-alpha 0.0)
|
|
|
+ format
|
|
|
+ background-color
|
|
|
+ background-alpha
|
|
|
alpha-channel)
|
|
|
(call-with-magick-wand
|
|
|
(lambda (wand)
|
|
|
(call-with-pixel-wand
|
|
|
(lambda (background)
|
|
|
- (PixelSetColor background background-color)
|
|
|
- (PixelSetAlpha background background-alpha)
|
|
|
+ (when background-color
|
|
|
+ (PixelSetColor background background-color))
|
|
|
+ (when background-alpha
|
|
|
+ (PixelSetAlpha background background-alpha))
|
|
|
(MagickNewImage wand width height background)))
|
|
|
(when format
|
|
|
(MagickSetImageFormat wand format))
|