racket/draw: support libjpeg v9

Closes PR 13721
(cherry picked from commit 158997cde7)
This commit is contained in:
Matthew Flatt 2013-05-05 09:12:35 -06:00 committed by Ryan Culpepper
parent a3a5a4e2e2
commit 0c3cd96d23

View File

@ -7,7 +7,7 @@
"../private/libs.rkt")
(define-runtime-lib jpeg-lib
[(unix) (ffi-lib "libjpeg" '("62" "8" ""))]
[(unix) (ffi-lib "libjpeg" '("62" "8" "9" ""))]
[(macosx)
;; for PPC, it's actually version 8!
(ffi-lib "libjpeg.62.dylib")]
@ -24,6 +24,7 @@
(define _J_COLOR_SPACE _int)
(define _J_DCT_METHOD _int)
(define _J_DITHER_MODE _int)
(define _J_COLOR_TRANSFORM _int)
(define _jbool (if win64?
(make-ctype _byte
@ -96,7 +97,7 @@
(string->number (cadr m))
"unknown"))))))
(unless (member JPEG_LIB_VERSION '(62 64 70 80))
(unless (member JPEG_LIB_VERSION '(62 64 70 80 90))
(error 'jpeg "unsupported library version: ~e" JPEG_LIB_VERSION))
(define-syntax-rule (cstruct-type/version elem ...)
@ -261,6 +262,9 @@
[saw_Adobe_marker _jbool]
[Adobe_transform _uint8]
,([(90) ([color_transform _J_COLOR_TRANSFORM])]
[else ()])
[CCIR601_sampling _jbool]
[marker_list _pointer]
@ -470,6 +474,9 @@
[Y_density _uint16]
[write_Adobe_marker _jbool]
,([(90) ([color_transform _J_COLOR_TRANSFORM])]
[else ()])
[next_scanline _JDIMENSION]
[progressive_mode _jbool]