mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 20:22:31 +02:00
IMG-13: http.Header, *ImageData -> ImageData (#1473)
* ImageData.Headers() * *ImageData -> ImageData * withmatt -> httpheaders of our own * .Clone() headers, nil * NewFromBytesWithFormat -> nil * svg.go -> do not Clone()
This commit is contained in:
@@ -32,7 +32,7 @@ func cropImage(img *vips.Image, cropWidth, cropHeight int, gravity *options.Grav
|
||||
return img.Crop(left, top, cropWidth, cropHeight)
|
||||
}
|
||||
|
||||
func crop(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
func crop(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata imagedata.ImageData) error {
|
||||
width, height := pctx.cropWidth, pctx.cropHeight
|
||||
|
||||
opts := pctx.cropGravity
|
||||
@@ -47,6 +47,6 @@ func crop(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions,
|
||||
return cropImage(img, width, height, &opts, 1.0)
|
||||
}
|
||||
|
||||
func cropToResult(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
func cropToResult(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata imagedata.ImageData) error {
|
||||
return cropImage(img, pctx.resultCropWidth, pctx.resultCropHeight, &po.Gravity, pctx.dprScale)
|
||||
}
|
||||
|
Reference in New Issue
Block a user