diff options
| author | AppleDash <[email protected]> | 2020-08-07 19:47:17 -0400 |
|---|---|---|
| committer | AppleDash <[email protected]> | 2020-08-07 19:47:17 -0400 |
| commit | 37acc89b06313f57796a4aaac6e66a901733ea7f (patch) | |
| tree | d30a010f81677ea306871b62ac3372dce3ed921a /lib/booru/image_processing/processor.rb | |
| parent | 07c9e6fcf2ae7b0e22c2333ebb3ffe6a5e3a1d3c (diff) | |
Minor cleanup
Diffstat (limited to 'lib/booru/image_processing/processor.rb')
| -rw-r--r-- | lib/booru/image_processing/processor.rb | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/booru/image_processing/processor.rb b/lib/booru/image_processing/processor.rb index e610b3e..59cae9d 100644 --- a/lib/booru/image_processing/processor.rb +++ b/lib/booru/image_processing/processor.rb @@ -1,13 +1,7 @@ module Booru module ImageProcessing class Processor - PROCESSORS = { - 'image/png' => Booru::ImageProcessing::PngProcessor, - 'image/jpeg' => Booru::ImageProcessing::JpegProcessor, - 'image/gif' => Booru::ImageProcessing::GifProcessor - } - - attr_reader :rasterized + attr_reader :rasterized # actually rasterized or still previws def initialize(original_path, directory) @original_path = original_path @@ -16,7 +10,7 @@ module Booru end # Apply pre-processing to the image. This is anything that should be done to the original - # file, before any of the versions are generated. (eg: sanitization) + # file, before any of the versions are generated. (eg: sanitization, rasterization) def pre_process # do nothing by default end @@ -28,6 +22,7 @@ module Booru raise NotImplementedError end + # generate the full version of the image; this could be multiple versions. def generate_full_version(destination_path) FileUtils.ln_sf(@original_path, destination_path) end @@ -46,10 +41,6 @@ module Booru def is_video? false end - - def self.for_content_type(content_type) - PROCESSORS[content_type] - end end end end |
