mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle Format_Grayscale8 images
This commit is contained in:
parent
9debdee433
commit
b594de0ae4
@ -419,7 +419,7 @@ QImage quantize(const QImage &image, unsigned int maximum_colors, bool dither, c
|
||||
if (fmt != QImage::Format_RGB32 && fmt != QImage::Format_Indexed8 && fmt != 24) { // 24 = QImage::Format_Grayscale8
|
||||
img = img.convertToFormat(QImage::Format_RGB32);
|
||||
if (img.isNull()) throw std::bad_alloc();
|
||||
}
|
||||
} else if (fmt == 24) img = img.convertToFormat(QImage::Format_Indexed8);
|
||||
// There can be no more than MAX_LEAVES * 8 nodes. Add 1 in case there is an off by 1 error somewhere.
|
||||
Pool<Node> node_pool((MAX_LEAVES + 1) * 8);
|
||||
if (palette.size() > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user