Run function to go through the steps automatically. Just add $filename and $destination and we're set.

This commit is contained in:
Ismo Vuorinen
2013-06-27 04:27:32 +03:00
parent 38cae8b68b
commit 5bbcdeff55

View File

@@ -82,6 +82,17 @@ class Palette
}
}
public function run()
{
if (empty($this->destination)) {
throw new Exception("No destination provided, can't save.")
}
$this->isImage();
$this->getPalette();
$this->save();
}
/**
* getPalette
* Returns colors used in an image specified in $filename