OSDN Git Service

getBitmapSize メソッドのテストスクリプト
authoryoya <yoya@7c90b180-03d5-4157-b861-58a559ae9d1e>
Sun, 3 Apr 2011 08:02:05 +0000 (08:02 +0000)
committeryoya <yoya@7c90b180-03d5-4157-b861-58a559ae9d1e>
Sun, 3 Apr 2011 08:02:05 +0000 (08:02 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/swfed/trunk@515 7c90b180-03d5-4157-b861-58a559ae9d1e

src/tests/bitmap001.phpt [new file with mode: 0644]
src/tests/bitmap002.phpt [new file with mode: 0644]

diff --git a/src/tests/bitmap001.phpt b/src/tests/bitmap001.phpt
new file mode 100644 (file)
index 0000000..5315106
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+getBitmapSize JPG
+--FILE--
+<?php
+
+$swf_filename = 'tests/saitama.swf';
+
+$swfdata = file_get_contents($swf_filename);
+
+$obj = new SWFEditor();
+$obj->input($swfdata);
+$image_id = 1;
+foreach ($obj->getBitmapSize($image_id) as $key => $value) {
+    echo "$key=$value\n";
+}
+?>
+===DONE===
+--EXPECTF--
+width=108
+height=80
+===DONE===
diff --git a/src/tests/bitmap002.phpt b/src/tests/bitmap002.phpt
new file mode 100644 (file)
index 0000000..418e7be
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+getBitmapSize Lossless
+--FILE--
+<?php
+
+$swf_filename = 'tests/negimiku.swf';
+
+$swfdata = file_get_contents($swf_filename);
+
+$obj = new SWFEditor();
+$obj->input($swfdata);
+$image_id = 1;
+foreach ($obj->getBitmapSize($image_id) as $key => $value) {
+    echo "$key=$value\n";
+}
+?>
+===DONE===
+--EXPECTF--
+width=320
+height=240
+===DONE===