From: Philip S T. <blu...@us...> - 2004-03-02 20:09:57
|
Update of /cvsroot/ayttm/ayttm/modules/image_filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17050/modules/image_filter Modified Files: img2jpc.c Log Message: receiving webcam broadcasts works again. When jasper encoding was moved to a module, the calls to jas_image_strtofmt got shifted to before the call to jas_init. I'm still not sure why we need to call jas_init before every encode. Maybe soon I'll figure it out. Index: img2jpc.c =================================================================== RCS file: /cvsroot/ayttm/ayttm/modules/image_filter/img2jpc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- img2jpc.c 16 Feb 2004 08:14:40 -0000 1.6 +++ img2jpc.c 2 Mar 2004 19:57:56 -0000 1.7 @@ -63,11 +63,13 @@ il->label= _("Send JPEG2000 images (creates huge data transfers)"); il->type = EB_INPUT_CHECKBOX; - old_img_2_jpg = image_2_jpg; - image_2_jpg = img_2_jpg; + if(!jas_init()) { + old_img_2_jpg = image_2_jpg; + image_2_jpg = img_2_jpg; - old_img_2_jpc = image_2_jpc; - image_2_jpc = img_2_jpc; + old_img_2_jpc = image_2_jpc; + image_2_jpc = img_2_jpc; + } return 0; } @@ -167,5 +169,5 @@ return ay_memdup(in_img, *size); if(!outfmt) outfmt = jas_image_strtofmt("jpc"); - return img_2_img(in_img, size, outfmt, "jpc", "rate=0.0219"); + return img_2_img(in_img, size, outfmt, "jpc", "rate=0.0219\nmode=real"); } |