Open bellacbs opened 2 years ago
I'm converting some by compressing some images, but sometimes the alert appears:
(process:21837): VIPS-WARNING **: 10:16:34.520: read gave 149 warnings (process:21837): VIPS-WARNING **: 10:16:34.530:
when this alert appears I notice that the compressed image has been corrupted Does anyone know how I would capture this warning of a specific image for treatment using bimg or golang?
I'm using this code:
func compress(inputName string, outPutName string) error { options := bimg.Options{ Type: bimg.JPEG, Width: 480, Quality: 80, } buffer, err := bimg.Read(inputName) if err != nil { return err } newImage, err := bimg.NewImage(buffer).Process(options) if err != nil { return err } err = bimg.Write(outPutName, newImage) if err != nil { return err } return nil }
This occurred to me as well. For now it seems more likely to happen when I resize images on multiple goroutines at the same time.
I'm converting some by compressing some images, but sometimes the alert appears:
when this alert appears I notice that the compressed image has been corrupted Does anyone know how I would capture this warning of a specific image for treatment using bimg or golang?
I'm using this code: