git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved declarations into include file
[swftools.git]
/
lib
/
modules
/
swfbits.c
diff --git
a/lib/modules/swfbits.c
b/lib/modules/swfbits.c
index
0749e0b
..
72e65af
100644
(file)
--- a/
lib/modules/swfbits.c
+++ b/
lib/modules/swfbits.c
@@
-1185,6
+1185,7
@@
TAG* swf_AddImage(TAG*tag, int bitid, RGBA*mem, int width, int height, int quali
swf_SetU16(tag1, bitid);
swf_SetLosslessImage(tag1, mem, width, height);
swf_SetU16(tag1, bitid);
swf_SetLosslessImage(tag1, mem, width, height);
+#if defined(HAVE_JPEGLIB)
/* try jpeg image */
if(has_alpha) {
tag2 = swf_InsertTag(0, ST_DEFINEBITSJPEG3);
/* try jpeg image */
if(has_alpha) {
tag2 = swf_InsertTag(0, ST_DEFINEBITSJPEG3);
@@
-1195,8
+1196,9
@@
TAG* swf_AddImage(TAG*tag, int bitid, RGBA*mem, int width, int height, int quali
swf_SetU16(tag2, bitid);
swf_SetJPEGBits2(tag2, width, height, mem, quality);
}
swf_SetU16(tag2, bitid);
swf_SetJPEGBits2(tag2, width, height, mem, quality);
}
+#endif
- if(quality>100 || (tag1 && tag1->len < tag2->len)) {
+ if(quality>100 || !tag2 || (tag1 && tag1->len < tag2->len)) {
/* use the zlib version- it's smaller */
tag1->prev = tag;
if(tag) tag->next = tag1;
/* use the zlib version- it's smaller */
tag1->prev = tag;
if(tag) tag->next = tag1;