Przeglądaj źródła

Cast to uchar when saving to BMP

DarthSim 5 lat temu
rodzic
commit
3882abae48
1 zmienionych plików z 1 dodań i 1 usunięć
  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
 		}