Commit 2684d499 by Li Feifei

add width hegight

parent dd400f50
Pipeline #14952 passed with stages
in 1 minute 7 seconds
......@@ -489,16 +489,12 @@ func pdfThumbnail(objectPath string, file *zip.File, bucket *oss.Bucket) ([]inte
filenameOnly = strings.Replace(filenameOnly, "p", "", -1)
fileName := fmt.Sprintf("%05s", filenameOnly) + ".webp"
c, _, err := image.DecodeConfig(fc)
if err != nil {
return nil, err
}
info := img.Bounds()
var imageInfo []interface{}
imageInfo = append(imageInfo, fileName)
imageInfo = append(imageInfo, c.Width)
imageInfo = append(imageInfo, c.Height)
log.Println("path == ", objectPathName+fileName)
log.Println("ImageInfo == ", imageInfo)
imageInfo = append(imageInfo, info.Max.X)
imageInfo = append(imageInfo, info.Max.Y)
return imageInfo, bucket.PutObject(objectPathName+fileName, r)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment