git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1267403
)
fix: grayscale jpegs weren't handled correctly
author
kramm
<kramm>
Wed, 21 Nov 2001 14:31:54 +0000
(14:31 +0000)
committer
kramm
<kramm>
Wed, 21 Nov 2001 14:31:54 +0000
(14:31 +0000)
lib/modules/swfbits.c
patch
|
blob
|
history
diff --git
a/lib/modules/swfbits.c
b/lib/modules/swfbits.c
index
4349b96
..
d6e59fc
100644
(file)
--- a/
lib/modules/swfbits.c
+++ b/
lib/modules/swfbits.c
@@
-121,10
+121,10
@@
int swf_SetJPEGBits(TAG * t,char * fname,int quality)
jpeg_create_decompress(&cinfo);
if ((f=fopen(fname,"rb"))==NULL) return -1;
jpeg_create_decompress(&cinfo);
if ((f=fopen(fname,"rb"))==NULL) return -1;
-
jpeg_stdio_src(&cinfo,f);
jpeg_read_header(&cinfo, TRUE);
jpeg_stdio_src(&cinfo,f);
jpeg_read_header(&cinfo, TRUE);
+ cinfo.out_color_space = JCS_RGB; //automatically convert grayscale images
jpeg_start_decompress(&cinfo);
out = swf_SetJPEGBitsStart(t,cinfo.output_width,cinfo.output_height,quality);
jpeg_start_decompress(&cinfo);
out = swf_SetJPEGBitsStart(t,cinfo.output_width,cinfo.output_height,quality);