lib/image_processing/mini_magick.rb
def disallow_split_layers!(destination_path)
          layers = Dir[destination_path.sub(/(\.\w+)?$/, '-*\0')]

          if layers.any?
            layers.each { |path| File.delete(path) }
            raise Error, "Source format is multi-layer, but destination format is single-layer. If you care only about the first layer, add `.loader(page: 0)` to your pipeline. If you want to process each layer, see https://github.com/janko/image_processing/wiki/Splitting-a-PDF-into-multiple-images or use `.saver(allow_splitting: true)`."
          end
        end
# When a multi-layer format is being converted into a single-layer
# format, ImageMagick will create multiple images, one for each layer.
# We want to warn the user that this is probably not what they wanted.
When a multi-layer format is being converted into a single-layer
format, ImageMagick will create multiple images, one for each layer.
We want to warn the user that this is probably not what they wanted.
When a multi - layer format is being converted into a single - layer format ImageMagick will create multiple images one for each layer . We want to warn the user that this is probably not what they wanted .
def disallow_split_layers!(destination_path)
          layers = Dir[destination_path.sub(/(\.\w+)?$/, '-*\0')]
          if layers.any?
            layers.each { |path| File.delete(path) }
            raise Error, "Source format is multi-layer, but destination format is single-layer. If you care only about the first layer, add `.loader(page: 0)` to your pipeline. If you want to process each layer, see https://github.com/janko/image_processing/wiki/Splitting-a-PDF-into-multiple-images or use `.saver(allow_splitting: true)`."
          end
        end
def disallow_split_layers! ( destination_path ) layers = Dir [ destination_path . sub ( / ( \. \w +)?$ / , '-*\0' ) ] if layers . any? layers . each { | path | File . delete ( path ) } raise Error , "Source format is multi-layer, but destination format is single-layer. If you care only about the first layer, add `.loader(page: 0)` to your pipeline. If you want to process each layer, see https://github.com/janko/image_processing/wiki/Splitting-a-PDF-into-multiple-images or use `.saver(allow_splitting: true)`." end end
When a multi-layer format is being converted into a single-layer
format, ImageMagick will create multiple images, one for each layer.
When a multi - layer format is being converted into a single - layer format ImageMagick will create multiple images one for each layer .
destination_path