From 03b06353fe49c42b0255e37b6870889c05074502 Mon Sep 17 00:00:00 2001 From: "Kim, sungpark" Date: Wed, 8 Dec 2021 00:08:44 +0900 Subject: [PATCH] Add the 'minWidth, minHeight' method. --- .../io/rocketbase/asset/imgproxy/Signature.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/io/rocketbase/asset/imgproxy/Signature.java b/src/main/java/io/rocketbase/asset/imgproxy/Signature.java index 96c6924..831baed 100644 --- a/src/main/java/io/rocketbase/asset/imgproxy/Signature.java +++ b/src/main/java/io/rocketbase/asset/imgproxy/Signature.java @@ -58,6 +58,7 @@ public Signature size(int width, int height, boolean enlarge, boolean extend) { return this; } + /** * Meta-option that defines the width, height, enlarge, and extend. All arguments are optional and can be omited to use their default values. */ @@ -106,6 +107,22 @@ public Signature resize(ResizeType resizeType) { return this; } + /** + * Defines how imgproxy will min-width the source image. + */ + public Signature minWidth(int minWidth){ + processingOptions.add(createProcessingOption("mw", minWidth)); + return this; + } + + /** + * Defines how imgproxy will min-height the source image. + */ + public Signature minHeight(int minHeight){ + processingOptions.add(createProcessingOption("mh", minHeight)); + return this; + } + /** * Defines the width of the resulting image. When set to 0, imgproxy will calculate the resulting width using the defined height and source aspect ratio. * Default: 0