mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
a821e7459e
commit
a60319b6d6
@ -279,13 +279,13 @@ def normalize(img):
|
||||
raise RuntimeError(imageops_err)
|
||||
return imageops.normalize(image_from_data(img))
|
||||
|
||||
def quantize(img, num_of_colors=256, dither=True):
|
||||
def quantize(img, colors=256, dither=True):
|
||||
if imageops is None:
|
||||
raise RuntimeError(imageops_err)
|
||||
img = image_from_data(img)
|
||||
if img.hasAlphaChannel():
|
||||
img = blend_image(img)
|
||||
return imageops.quantize(img, num_of_colors, dither)
|
||||
return imageops.quantize(img, colors, dither)
|
||||
|
||||
# Optimization of images {{{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user