+int swfoutput_drawimagejpeg(struct swfoutput*obj, RGBA*mem, int sizex,int sizey,
+ double x1,double y1,
+ double x2,double y2,
+ double x3,double y3,
+ double x4,double y4)
+{
+ TAG*oldtag;
+ JPEGBITS*jpeg;
+
+ if(shapeid>=0)
+ endshape();
+ if(textid>=0)
+ endtext();
+
+ int bitid = ++currentswfid;
+ oldtag = tag;
+ tag = swf_InsertTag(tag,ST_DEFINEBITSJPEG2);
+ swf_SetU16(tag, bitid);
+ swf_SetJPEGBits2(tag,sizex,sizey,mem,jpegquality);
+ drawimage(obj, bitid, sizex, sizey, x1,y1,x2,y2,x3,y3,x4,y4);
+ return bitid;
+}
+