subtract (0.5,0.5) from the texture position to get rid of the
[swftools.git] / src / jpeg2swf.c
index 4eae988..7c23147 100644 (file)
@@ -211,7 +211,7 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int quality,
        t = swf_InsertTag(t, ST_VIDEOFRAME);
        swf_SetU16(t, 0xf00d);
        quant = 1+(30-(30*quality)/100);
-       if(!(frame&127)) {
+       if(!(frame%20)) {
            swf_SetVideoStreamIFrame(t, &stream, pic2, quant);
        } else {
            swf_SetVideoStreamPFrame(t, &stream, pic2, quant);
@@ -240,6 +240,8 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int quality,
        swf_GetMatrix(NULL, &m);
        m.sx = 20 * 0x10000;
        m.sy = 20 * 0x10000;
+       m.tx = -10;
+       m.ty = -10;
        fs = swf_ShapeAddBitmapFillStyle(s, &m, id, 0);
        swf_SetU16(t, id + 1);  // id
        r.xmin = r.ymin = 0;