mirror of
https://github.com/ivuorinen/palette.git
synced 2026-01-26 11:34:09 +00:00
Run function to go through the steps automatically. Just add $filename and $destination and we're set.
This commit is contained in:
11
palette.php
11
palette.php
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user