mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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...
This commit is contained in:
parent
90ab7573d9
commit
5e7907b0aa
@ -72,7 +72,7 @@ QImage ordered_dither(const QImage &image) { // {{{
|
|||||||
QImage img = image;
|
QImage img = image;
|
||||||
int y = 0, x = 0, width = img.width(), height = img.height();
|
int y = 0, x = 0, width = img.width(), height = img.height();
|
||||||
uint8_t gray = 0, dithered = 0;
|
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...
|
// We're running behind blend_image, so, we should only ever be fed RGB32 as input...
|
||||||
if (img.format() != QImage::Format_RGB32) {
|
if (img.format() != QImage::Format_RGB32) {
|
||||||
|
@ -468,7 +468,7 @@ def eink_dither_image(img):
|
|||||||
Running blend_image if the image has an alpha channel,
|
Running blend_image if the image has an alpha channel,
|
||||||
or grayscale_image if it's not already grayscaled is the caller's responsibility.
|
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)
|
img = image_from_data(img)
|
||||||
return imageops.ordered_dither(img)
|
return imageops.ordered_dither(img)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user