[Swfed-svn] swfed-svn [447] replace png のテストスクリプト

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2011年 3月 23日 (水) 01:15:00 JST


Revision: 447
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=447
Author:   yoya
Date:     2011-03-23 01:15:00 +0900 (Wed, 23 Mar 2011)

Log Message:
-----------
replace png のテストスクリプト

Added Paths:
-----------
    trunk/src/tests/negimiku001.png
    trunk/src/tests/png001.phpt


-------------- next part --------------
Added: trunk/src/tests/negimiku001.png
===================================================================
(Binary files differ)


Property changes on: trunk/src/tests/negimiku001.png
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Added: trunk/src/tests/png001.phpt
===================================================================
--- trunk/src/tests/png001.phpt	                        (rev 0)
+++ trunk/src/tests/png001.phpt	2011-03-22 16:15:00 UTC (rev 447)
@@ -0,0 +1,25 @@
+--TEST--
+replacePNGData (transparent)
+--FILE--
+<?php
+
+$swf_filename = 'tests/saitama.swf';
+$gif_filename = 'tests/negimiku001.png';
+
+$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->replacePNGData($image_id, $gifdata);
+echo md5($obj->output())."\n";
+?>
+===DONE===
+--EXPECTF--
+6ba8db0102cbd553a142bc1733264356
+===DONE===



Swfed-svn メーリングリストの案内
Zurück zum Archiv-Index