Fix "cannot handle pixel format 26 during make_transparent()" (part of #1545).
authorCarl Hetherington <cth@carlh.net>
Fri, 3 May 2019 14:00:19 +0000 (14:00 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 3 May 2019 14:00:41 +0000 (14:00 +0000)
src/lib/image.cc

index 959eec5a549732443df4f6037d3dc795ac008803..d3b193e7bc99a7d17c5c103489118809a3875d33 100644 (file)
@@ -469,7 +469,7 @@ Image::make_black ()
 void
 Image::make_transparent ()
 {
-       if (_pixel_format != AV_PIX_FMT_BGRA) {
+       if (_pixel_format != AV_PIX_FMT_BGRA && _pixel_format != AV_PIX_FMT_RGBA) {
                throw PixelFormatError ("make_transparent()", _pixel_format);
        }