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:
@@ -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)
|
||||
|
||||
@@ -69,8 +69,6 @@ class PixivUgoiraConverter
|
||||
end
|
||||
|
||||
def self.generate_crop(ugoira_file)
|
||||
return nil unless Danbooru.config.enable_image_cropping
|
||||
|
||||
file = Tempfile.new(["ugoira-crop", ".zip"], binmode: true)
|
||||
zipfile = Zip::File.new(ugoira_file.path)
|
||||
zipfile.entries.first.extract(file.path) { true } # 'true' means overwrite the existing tempfile.
|
||||
|
||||
Reference in New Issue
Block a user