summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/image/png.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/chickadee/image/png.scm b/chickadee/image/png.scm
index b6cb3bf..6cdbc14 100644
--- a/chickadee/image/png.scm
+++ b/chickadee/image/png.scm
@@ -36,7 +36,8 @@
;;; Enums
;;;
-(define PNG_TRANSFORM_IDENTITY 0)
+(define PNG_TRANSFORM_IDENTITY #x0000)
+(define PNG_TRANSFORM_EXPAND #x0010)
(define PNG_COLOR_MASK_PALETTE 1)
(define PNG_COLOR_MASK_COLOR 2)
@@ -185,7 +186,7 @@
(define (read-png read-struct info-struct)
(png-read-png (unwrap-png-read-struct read-struct)
(unwrap-png-info-struct info-struct)
- PNG_TRANSFORM_IDENTITY
+ PNG_TRANSFORM_EXPAND
%null-pointer))
(define (png-header? header)
@@ -247,8 +248,9 @@
(bytevector-u16-ref row offset
(endianness big)))))
(values gray gray gray 255))))))
+ ;; This case should hopefully not happen due to using the
+ ;; PNG_TRANSFORM_EXPAND read flag, but just in case...
((= color-type PNG_COLOR_TYPE_PALETTE)
- ;; TODO: Handle palettes.
(raise-exception
(make-exception-with-message
"PNG images using color palettes are not supported")))