mirror of
https://github.com/msikma/pokesprite.git
synced 2026-09-11 20:05:09 -05:00
Only save if the file has changed
This commit is contained in:
@@ -30,7 +30,9 @@ foreach ($imgs as $path => $img) {
|
||||
imagealphablending($i, false);
|
||||
imagesavealpha($i, true);
|
||||
$changed = change_color($i);
|
||||
imagepng($i, $new_name, 9);
|
||||
if ($changed) {
|
||||
imagepng($i, $new_name, 9);
|
||||
}
|
||||
print('img: '.$path.' (changed: '.($changed === true ? 'T' : 'F').')'.PHP_EOL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user