Upgrade to 4.1.0

This commit is contained in:
Bastian Allgeier
2024-01-30 16:41:06 +01:00
parent 5c44c8fcfd
commit 9345fc1a0b
59 changed files with 678 additions and 274 deletions

View File

@@ -89,6 +89,7 @@ class Filename
'blur' => $this->blur(),
'bw' => $this->grayscale(),
'q' => $this->quality(),
'sharpen' => $this->sharpen(),
];
$array = array_filter(
@@ -244,6 +245,18 @@ class Filename
return F::safeBasename($name);
}
/**
* Normalizes the sharpen option value
*/
public function sharpen(): int|false
{
return match ($this->attributes['sharpen'] ?? false) {
false => false,
true => 50,
default => (int)$this->attributes['sharpen']
};
}
/**
* Returns the converted filename as string
*/