DarthSim 6 лет назад
Родитель
Сommit
72049f3b88
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      process.go

+ 4 - 0
process.go

@@ -580,6 +580,10 @@ func processImage(ctx context.Context) ([]byte, context.CancelFunc, error) {
 		return imgdata.Data, func() {}, nil
 	}
 
+	if imgdata.Type == imageTypeSVG && !vipsTypeSupportLoad[imageTypeSVG] {
+		return []byte{}, func() {}, errSourceImageTypeNotSupported
+	}
+
 	if !vipsSupportSmartcrop {
 		if po.Gravity.Type == gravitySmart {
 			logWarning(msgSmartCropNotSupported)