config: remove enable_image_cropping option.

There's no need to disable this option. Supporting it adds complexity
and disabling it is untested.
This commit is contained in:
evazion
2020-05-17 15:01:59 -05:00
parent 0a12f35c47
commit 24c53172db
6 changed files with 3 additions and 11 deletions

View File

@@ -27,8 +27,6 @@ module DanbooruImageResizer
end
def crop(file, width, height, resize_quality = 90)
return nil unless Danbooru.config.enable_image_cropping
output_file = Tempfile.new
resized_image = Vips::Image.thumbnail(file.path, width, height: height, **CROP_OPTIONS)
resized_image.jpegsave(output_file.path, Q: resize_quality, **JPEG_OPTIONS)