Top > IO_SWF
インストールcomposer require yoya/io_swf 使い方サンプル中身を見るphp vendor/yoya/io_swf/sample/swfdump.php -f test.swf
画像入れ替え$swf_data = file_get_contents('test.swf'); $bitmap_id = 1; // swfdump で調べてね! $bitmap_data = file_get_contents('aria.png'); $swf = new IO_SWF_Editor(); $swf->input($swf_data); $swf->replaceBitmapData($bitmap_id, $bitmap_data) サイズや色指定でも入れ替え出来ます。$swf_data = file_get_contents('test.swf'); // 100x100の赤い画像と入れ替える $bitmap_conf = array('width' => 100, 'height'=>100, 'red'=>255, 'green'=>0, 'blue'=>0); $bitmap_data = file_get_contents('aria.png'); $swf = new IO_SWF_Editor(); $swf->input($swf_data); $swf->replaceBitmapData($bitmap_cond, $bitmap_data) IO_SWF_Editor method
関連 |