Beispiel #1
0
 public function testDepth()
 {
     $source = fopen("{$this->_files}/image_png.png", 'r');
     // this one has 16 bit
     $subject = new Imagick($source);
     $reduced = fopen('php://temp', 'w+');
     $result = $subject->depth(8);
     $subject->store($reduced);
     $sourceMeta = fstat($source);
     $reducedMeta = fstat($reduced);
     $this->assertTrue($result);
     $this->assertLessThan($sourceMeta['size'], $reducedMeta['size']);
     fclose($source);
     fclose($reduced);
 }