-.TH jpeg2swf "1" "January 2005" "jpeg2swf" "swftools"
+.TH jpeg2swf "1" "January 2006" "jpeg2swf" "swftools"
.SH NAME
jpeg2swf - Converts jpeg images to SWF.
Use Flash MX (SWF 6) Zlib encoding for the output. The resulting SWF will be
smaller, but not playable in Flash Plugins of Version 5 and below.
.TP
+\fB\-x\fR, \fB\-\-xoffset\fR \fIoffset\fR
+ horizontally offset images by \fIoffset\fR
+.TP
+\fB\-y\fR, \fB\-\-yoffset\fR \fIoffset\fR
+ vertically offset images by \fIoffset\fR
+.TP
\fB\-X\fR, \fB\-\-width\fR \fIwidth\fR
Force movie width to \fIwidth\fR (default: autodetect)
.TP
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version information and exit
+.TP
+\fB\-f\fR, \fB\-\-fit-to-movie\fR
+ Fit images to movie size
+.TP
+\fB\-e\fR, \fB\-\-export\fR \fIassetname\fR
+ Make importable as asset with \fIassetname\fR
.SH AUTHORS
Rainer Böhme <rfxswf@reflex-studio.de>
.TP
Matthias Kramm
+
{"q", "quality"},
{"r", "rate"},
{"z", "zlib"},
-{"X", "width"},
-{"Y", "height"},
{"x", "xoffset"},
{"y", "yoffset"},
-{"e", "export"},
-{"f", "fit-to-movie"},
+{"X", "width"},
+{"Y", "height"},
{"v", "verbose"},
{"V", "version"},
+{"f", "fit-to-movie"},
+{"e", "export"},
{0,0}
};
printf("-y , --yoffset <offset> vertically offset images by <offset>\n");
printf("-X , --width <width> Force movie width to <width> (default: autodetect)\n");
printf("-Y , --height <height> Force movie height to <height> (default: autodetect)\n");
- printf("-f , --fit-to-movie Fit images to movie size\n");
- printf("-e , --export <assetname> Make importable as asset with <assetname>\n");
- printf("-v , --verbose Be verbose. Use more than one -v for greater effect \n");
- //printf("-q , --quiet Omit normal log messages, only log errors\n");
+ printf("-v , --verbose <level> Set verbose level to <level> (0=quiet, 1=default, 2=debug)\n");
printf("-V , --version Print version information and exit\n");
+ printf("-f , --fit-to-movie Fit images to movie size\n");
+ printf("-e , --export <assetname> Make importable as asset with <assetname>\n");
printf("\n");
}
int do_cgi;
int version;
char *outfile;
+ float scale;
} global;
struct {
swf_ShapeNew(&s);
swf_GetMatrix(NULL, &m);
- m.sx = 20 * 0x10000;
- m.sy = 20 * 0x10000;
+ m.sx = (int)(20 * 0x10000);
+ m.sy = (int)(20 * 0x10000);
m.tx = -10;
m.ty = -10;
fs = swf_ShapeAddBitmapFillStyle(s, &m, id, 1);
t = swf_InsertTag(t, ST_PLACEOBJECT2);
swf_GetMatrix(NULL, &m);
+ m.sx = (int)(0x10000 * global.scale);
+ m.sy = (int)(0x10000 * global.scale);
+
if(custom_move) {
m.tx = move_x*20;
m.ty = move_y*20;
} else {
- m.tx = (swf->movieSize.xmax - (int) header.width * 20) / 2;
- m.ty = (swf->movieSize.ymax - (int) header.height * 20) / 2;
+ m.tx = (swf->movieSize.xmax - (int) (header.width * global.scale * 20)) / 2;
+ m.ty = (swf->movieSize.ymax - (int) (header.height * global.scale * 20)) / 2;
}
swf_ObjectPlace(t, id + 1, 50, &m, NULL, NULL);
res = 1;
break;
+ case 's':
+ global.scale = atof(val)/100;
+ res = 1;
+ break;
+
case 'z':
global.version = 6;
res = 0;
{"q", "quiet"},
{"C", "cgi"},
{"V", "version"},
+{"s", "scale"},
{0,0}
};
printf("-z , --zlib <zlib> Enable Flash 6 (MX) Zlib Compression\n");
printf("-X , --pixel <width> Force movie width to <width> (default: autodetect)\n");
printf("-Y , --pixel <height> Force movie height to <height> (default: autodetect)\n");
- printf("-v , --verbose Be verbose. Use more than one -v for greater effect \n");
+ printf("-v , --verbose <level> Set verbose level (0=quiet, 1=default, 2=debug)\n");
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("\n");
}
global.framerate = 1.0;
global.verbose = 1;
global.version = 4;
+ global.scale = 1.0;
processargs(argc, argv);
fprintf(stderr, "Processing %i file(s)...\n", global.nfiles);
t = MovieStart(&swf, global.framerate,
- global.force_width ? global.force_width : global.
- max_image_width,
- global.force_height ? global.force_height : global.
- max_image_height);
+ global.force_width ? global.force_width : (int)(global.max_image_width*global.scale),
+ global.force_height ? global.force_height : (int)(global.max_image_height*global.scale));
{
int i;