Преглед на файлове

Cast to uchar when saving to BMP

DarthSim преди 5 години
родител
ревизия
3882abae48
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      process.go

+ 1 - 1
process.go

@@ -770,7 +770,7 @@ func processImage(ctx context.Context) ([]byte, context.CancelFunc, error) {
 
 	checkTimeout(ctx)
 
-	if po.Format == imageTypeGIF {
+	if po.Format == imageTypeGIF || po.Format == imageTypeBMP {
 		if err := img.CastUchar(); err != nil {
 			return nil, func() {}, err
 		}