mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2052766 [scrolling down books in latest version give error](https://bugs.launchpad.net/calibre/+bug/2052766)
This commit is contained in:
parent
f947ecf414
commit
8db9707e2e
@ -694,7 +694,7 @@ def convert_PIL_image_to_pixmap(im, device_pixel_ratio=1.0):
|
|||||||
if im.mode == "RGBA":
|
if im.mode == "RGBA":
|
||||||
fmt = QImage.Format.Format_RGBA8888
|
fmt = QImage.Format.Format_RGBA8888
|
||||||
data = im.tobytes("raw", "RGBA")
|
data = im.tobytes("raw", "RGBA")
|
||||||
elif im.mode == "RGB":
|
elif im.mode in ("RGB", "CMYK"):
|
||||||
fmt = QImage.Format.Format_RGBX8888
|
fmt = QImage.Format.Format_RGBX8888
|
||||||
data = im.convert("RGBA").tobytes("raw", "RGBA")
|
data = im.convert("RGBA").tobytes("raw", "RGBA")
|
||||||
elif im.mode == "1":
|
elif im.mode == "1":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user