X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=src%2Fjpeg2swf.c;h=9981a15f65848e074403ad91742903b3d4c79716;hp=544e7c9308ccef5b1edf990cf23bf5e9ed1f240a;hb=c63b2bf21dc1df9a736f0b4c08f6cba828cdab92;hpb=d0c255a3b63de4982e15f1c1c169ebdb08d4163c diff --git a/src/jpeg2swf.c b/src/jpeg2swf.c index 544e7c9..9981a15 100644 --- a/src/jpeg2swf.c +++ b/src/jpeg2swf.c @@ -136,6 +136,9 @@ int MovieFinish(SWF * swf, TAG * t, char *sname) sname = "output.swf"; handle = open(sname, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666); } + if(handle<0 && sname) { + perror(sname); + } if (swf_WriteSWF(handle, swf)<0) fprintf(stderr, "Unable to write output file: %s\n", sname); @@ -543,6 +546,7 @@ static struct options_t options[] = { {"y", "yoffset"}, {"X", "width"}, {"Y", "height"}, +{"T", "flashversion"}, {"v", "verbose"}, {"V", "version"}, {"f", "fit-to-movie"}, @@ -590,6 +594,7 @@ void args_callback_usage(char *name) printf("-y , --yoffset vertically offset images by \n"); printf("-X , --width Force movie width to (default: autodetect)\n"); printf("-Y , --height Force movie height to (default: autodetect)\n"); + printf("-T , --flashversion Set flash file version to \n"); printf("-v , --verbose Set verbose level to (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"); @@ -627,7 +632,7 @@ int main(int argc, char **argv) int i; for (i = 0; i < global.nfiles; i++) { if (VERBOSE(3)) - fprintf(stderr, "[%03i] %s (%i%%, 1/%i)\n", i, + fprintf(stderr, "[%03i] %s (%i%%)\n", i, image[i].filename, image[i].quality); t = MovieAddFrame(&swf, t, image[i].filename, image[i].quality, image[i].width, image[i].height);