private static void resize()

in src/main/java/org/apache/sling/thumbnails/internal/transformers/CropHandler.java [64:72]


    private static void resize(Builder<? extends InputStream> builder, ValueMap properties) {
        int width = properties.get(ResizeHandler.PN_WIDTH, -1);
        int height = properties.get(ResizeHandler.PN_HEIGHT, -1);
        if (width >= 0 && height >= 0) {
            builder.size(width, height);
        } else {
            throw new BadRequestException("Unable to resize thumbnail due to invalid parameters: \n%s", properties);
        }
    }