public function loadBinaryString($data)
{
$this->resource = new Imagick();
try {
$this->resource->readImageBlob($data);
} catch (\ImagickException $e) {
throw new \InvalidArgumentException("Passed binary string is empty or is not a valid image", 0, $e);
}
}