From 5e7907b0aa52170c316982071449ddcfbd3a842a Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Fri, 24 May 2019 01:28:11 +0200 Subject: [PATCH] Ups, actually Grayscale8, as I'm not writing a palette... Let's see what QImageWriter makes of that before checking if I really need to bother with Indexed8... --- src/calibre/utils/imageops/ordered_dither.cpp | 2 +- src/calibre/utils/img.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/utils/imageops/ordered_dither.cpp b/src/calibre/utils/imageops/ordered_dither.cpp index dcf1be5d82..7634b07c35 100644 --- a/src/calibre/utils/imageops/ordered_dither.cpp +++ b/src/calibre/utils/imageops/ordered_dither.cpp @@ -72,7 +72,7 @@ QImage ordered_dither(const QImage &image) { // {{{ QImage img = image; int y = 0, x = 0, width = img.width(), height = img.height(); uint8_t gray = 0, dithered = 0; - QImage dst(width, height, QImage::Format_Indexed8); + QImage dst(width, height, QImage::Format_Grayscale8); // We're running behind blend_image, so, we should only ever be fed RGB32 as input... if (img.format() != QImage::Format_RGB32) { diff --git a/src/calibre/utils/img.py b/src/calibre/utils/img.py index d66cf20753..f333755d54 100644 --- a/src/calibre/utils/img.py +++ b/src/calibre/utils/img.py @@ -468,7 +468,7 @@ def eink_dither_image(img): Running blend_image if the image has an alpha channel, or grayscale_image if it's not already grayscaled is the caller's responsibility. - Returns a QImage in Indexed8 pixel format. + Returns a QImage in Grayscale8 pixel format. ''' img = image_from_data(img) return imageops.ordered_dither(img)