U8 head2[8];
U8*data;
fread(head2,8,1,fi);
- if(strncmp(head,head2,4))
+ if(strncmp((char*)head,(char*)head2,4))
return 0;
while(png_read_chunk(&id, &len, &data, fi))
int width=0, height=0;
+#ifndef HAVE_JPEGLIB
if(global.mkjpeg) {
+ global.mkjpeg = 0;
+ msg("<warning> No jpeg support compiled in");
+ }
+#endif
+ if(global.mkjpeg) {
+#ifdef HAVE_JPEGLIB
RGBA*data = 0;
getPNG(sname, &width, &height, (unsigned char**)&data);
if(!data)
swf_SetU16(t, id);
swf_SetJPEGBits2(t, width,height,data,global.mkjpeg);
}
+#endif
} else if(1) {
RGBA*data = 0;
getPNG(sname, &width, &height, (unsigned char**)&data);
swf_GetMatrix(NULL, &m);
m.sx = (int)(20 * 0x10000);
m.sy = (int)(20 * 0x10000);
- m.tx = -10;
- m.ty = -10;
+ m.tx = 0;
+ m.ty = 0;
fs = swf_ShapeAddBitmapFillStyle(s, &m, id, 1);
swf_SetU16(t, id + 1); // id
printf("-q , --quiet Omit normal log messages, only log errors\n");
printf("-C , --cgi For use as CGI- prepend http header, write to stdout\n");
printf("-V , --version Print version information and exit\n");
- printf("-s , --scale <percent> Scale image to <percent>%% size.\n");
+ printf("-s , --scale <percent> Scale image to <percent>% size.\n");
printf("\n");
}
global.framerate = 1.0;
global.verbose = 1;
- global.version = 6;
+ global.version = 8;
global.scale = 1.0;
processargs(argc, argv);