Fix BUG 1214

Fix some BUG
Perfect unit-tests/ImageTest.php