svnno****@sourc*****
svnno****@sourc*****
2011年 3月 11日 (金) 01:23:36 JST
Revision: 414 http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=414 Author: yoya Date: 2011-03-11 01:23:36 +0900 (Fri, 11 Mar 2011) Log Message: ----------- jpeg 入れ替えテストスクリプト Added Paths: ----------- trunk/src/tests/5.jpg trunk/src/tests/jpeg.phpt -------------- next part -------------- Added: trunk/src/tests/5.jpg =================================================================== (Binary files differ) Property changes on: trunk/src/tests/5.jpg ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/src/tests/jpeg.phpt =================================================================== --- trunk/src/tests/jpeg.phpt (rev 0) +++ trunk/src/tests/jpeg.phpt 2011-03-10 16:23:36 UTC (rev 414) @@ -0,0 +1,25 @@ +--TEST-- +replaceJpegData test; +--FILE-- +<?php + +$swf_filename = 'tests/saitama.swf'; +$gif_filename = 'tests/5.jpg'; + +$swfdata = file_get_contents($swf_filename); +$obj = new SWFEditor(); + +$obj->setShapeAdjustMode(SWFEditor::SHAPE_BITMAP_RECT_RESIZE); +// $obj->setShapeAdjustMode(SWFEditor::SHAPE_BITMAP_MATRIX_RESCALE); +// $obj->setShapeAdjustMode(SWFEditor::SHAPE_BITMAP_TYPE_TILLED); + +$obj->input($swfdata); +$image_id = 1; +$gifdata = file_get_contents($gif_filename); +$obj->replaceJpegData($image_id, $gifdata); +echo md5($obj->output())."\n"; +?> +===DONE=== +--EXPECTF-- +51e77504526506cb5ea22ce187d55c30 +===DONE===