mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-19 11:03:40 +02:00
Fix new border removal for transparent PNG files not working
This commit is contained in:
parent
8c06b18e69
commit
5680cc2299
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ QImage* remove_borders(const QImage &image, double fuzz) {
|
|||
unsigned int width = img.width(), height = img.height();
|
||||
unsigned int top_border = 0, bottom_border = 0, left_border = 0, right_border = 0;
|
||||
|
||||
if (img.format() != QImage::Format_RGB32) {
|
||||
if (img.format() != QImage::Format_RGB32 && img.format() != QImage::Format_ARGB32) {
|
||||
img = img.convertToFormat(QImage::Format_RGB32);
|
||||
if (img.isNull()) { PyErr_NoMemory(); return NULL; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue