mirror of
https://github.com/ciromattia/kcc
synced 2026-10-20 00:12:34 +00:00
Add exact cover fit option for device-sized cover cropping (#1254)
* Add exact cover fit option for device-sized cover cropping * Update README to move cover cropping from FAQ to USAGE * rename to coverfill * edit readme
This commit is contained in:
@@ -569,7 +569,10 @@ class Cover:
|
||||
if self.options.kindle_scribe_azw3:
|
||||
size[0] = min(size[0], 1920)
|
||||
size[1] = min(size[1], 1920)
|
||||
self.image.thumbnail(tuple(size), Image.Resampling.LANCZOS)
|
||||
if self.options.coverfill:
|
||||
self.image = ImageOps.fit(self.image, tuple(size), Image.Resampling.LANCZOS, centering=(0.5, 0.5))
|
||||
else:
|
||||
self.image.thumbnail(tuple(size), Image.Resampling.LANCZOS)
|
||||
|
||||
def crop_main_cover(self):
|
||||
w, h = self.image.size
|
||||
|
||||
Reference in New Issue
Block a user