mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-09-29 13:03:50 +02:00
Merge branch 'master' into version/4
This commit is contained in:
@@ -1,11 +1,16 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
### Changed
|
||||||
|
- (pro) Improve video decoding performance.
|
||||||
|
- (pro) Respond with `422 Unprocessable Entity` on error during video decoding.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix the `Vary` header value when `IMGPROXY_AUTO_JXL` or `IMGPROXY_ENFORCE_JXL` configs are set to `true`.
|
- Fix the `Vary` header value when `IMGPROXY_AUTO_JXL` or `IMGPROXY_ENFORCE_JXL` configs are set to `true`.
|
||||||
- Fix connection break when the `raw` processing option is used and the response status code does not allow a response body (such as `304 Not Modified`).
|
- Fix connection break when the `raw` processing option is used and the response status code does not allow a response body (such as `304 Not Modified`).
|
||||||
- Fix the `If-Modified-Since` request header handling when the `raw` processing option is used.
|
- Fix the `If-Modified-Since` request header handling when the `raw` processing option is used.
|
||||||
- Fix `X-Origin-Height` and `X-Result-Height` debug header values for animated images.
|
- Fix `X-Origin-Height` and `X-Result-Height` debug header values for animated images.
|
||||||
|
- Fix keeping copyright info in EXIF.
|
||||||
- (pro) Fix generating thumbnails for VP9 videos with high bit depth.
|
- (pro) Fix generating thumbnails for VP9 videos with high bit depth.
|
||||||
- (pro) Fix `IMGPROXY_CUSTOM_RESPONSE_HEADERS` and `IMGPROXY_RESPONSE_HEADERS_PASSTHROUGH` configs behavior when the `raw` processing option is used.
|
- (pro) Fix `IMGPROXY_CUSTOM_RESPONSE_HEADERS` and `IMGPROXY_RESPONSE_HEADERS_PASSTHROUGH` configs behavior when the `raw` processing option is used.
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@ import (
|
|||||||
"github.com/imgproxy/imgproxy/v3/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func importColorProfile(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata imagedata.ImageData) error {
|
func colorspaceToProcessing(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata imagedata.ImageData) error {
|
||||||
if img.ColourProfileImported() {
|
if img.ColourProfileImported() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
@@ -6,7 +6,7 @@ import (
|
|||||||
"github.com/imgproxy/imgproxy/v3/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func exportColorProfile(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata imagedata.ImageData) error {
|
func colorspaceToResult(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata imagedata.ImageData) error {
|
||||||
keepProfile := !po.StripColorProfile && po.Format.SupportsColourProfile()
|
keepProfile := !po.StripColorProfile && po.Format.SupportsColourProfile()
|
||||||
|
|
||||||
if img.IsLinear() {
|
if img.IsLinear() {
|
@@ -23,7 +23,7 @@ var mainPipeline = pipeline{
|
|||||||
trim,
|
trim,
|
||||||
prepare,
|
prepare,
|
||||||
scaleOnLoad,
|
scaleOnLoad,
|
||||||
importColorProfile,
|
colorspaceToProcessing,
|
||||||
crop,
|
crop,
|
||||||
scale,
|
scale,
|
||||||
rotateAndFlip,
|
rotateAndFlip,
|
||||||
@@ -38,7 +38,7 @@ var mainPipeline = pipeline{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var finalizePipeline = pipeline{
|
var finalizePipeline = pipeline{
|
||||||
exportColorProfile,
|
colorspaceToResult,
|
||||||
stripMetadata,
|
stripMetadata,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ func trim(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We need to import color profile before trim
|
// We need to import color profile before trim
|
||||||
if err := importColorProfile(pctx, img, po, imgdata); err != nil {
|
if err := colorspaceToProcessing(pctx, img, po, imgdata); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ var watermarkPipeline = pipeline{
|
|||||||
vectorGuardScale,
|
vectorGuardScale,
|
||||||
prepare,
|
prepare,
|
||||||
scaleOnLoad,
|
scaleOnLoad,
|
||||||
importColorProfile,
|
colorspaceToProcessing,
|
||||||
scale,
|
scale,
|
||||||
rotateAndFlip,
|
rotateAndFlip,
|
||||||
padding,
|
padding,
|
||||||
|
@@ -424,6 +424,7 @@ vips_icc_is_srgb_iec61966(VipsImage *in)
|
|||||||
/* Predict it is sRGB IEC61966 2.1 by checking some header fields
|
/* Predict it is sRGB IEC61966 2.1 by checking some header fields
|
||||||
*/
|
*/
|
||||||
return ((memcmp(data + 48, "IEC ", 4) == 0) && // Device manufacturer
|
return ((memcmp(data + 48, "IEC ", 4) == 0) && // Device manufacturer
|
||||||
|
(memcmp(data + 16, "RGB ", 4) == 0) && // Colorspace
|
||||||
(memcmp(data + 52, "sRGB", 4) == 0) && // Device model
|
(memcmp(data + 52, "sRGB", 4) == 0) && // Device model
|
||||||
(memcmp(data + 80, "HP ", 4) == 0) && // Profile creator
|
(memcmp(data + 80, "HP ", 4) == 0) && // Profile creator
|
||||||
(memcmp(data + 24, date, 6) == 0) && // Date of creation
|
(memcmp(data + 24, date, 6) == 0) && // Date of creation
|
||||||
@@ -978,7 +979,7 @@ vips_strip(VipsImage *in, VipsImage **out, int keep_exif_copyright)
|
|||||||
|
|
||||||
VipsStripOptions opts = {
|
VipsStripOptions opts = {
|
||||||
.strip_all = 0,
|
.strip_all = 0,
|
||||||
.keep_exif_copyright = FALSE,
|
.keep_exif_copyright = keep_exif_copyright,
|
||||||
.keep_animation = FALSE,
|
.keep_animation = FALSE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user