lib/psd.rb in psd-1.0.0 vs lib/psd.rb in psd-1.1.0

- old
+ new

@@ -26,11 +26,12 @@ DEFAULTS = { parse_image: false, parse_layer_images: false } - attr_reader :file + attr_reader :file, :opts + alias :options :opts # Opens the named file, parses it, and makes it available for reading. Then, closes it after you're finished. # @param filename [String] the name of the file to open # @return [PSD] the {PSD} object if no block was given, otherwise the value of the block def self.open(filename, opts={}, &block) @@ -110,11 +111,11 @@ # have been parsed first since they are required. def layer_mask ensure_header ensure_resources - @layer_mask ||= LayerMask.new(@file, @header).parse + @layer_mask ||= LayerMask.new(@file, @header, @opts).parse end # Get the full size flattened preview Image. def image ensure_header @@ -162,9 +163,9 @@ end def ensure_layer_mask return unless @layer_mask.nil? - @layer_mask = LayerMask.new(@file, @header) + @layer_mask = LayerMask.new(@file, @header, @opts) @layer_mask.skip end end \ No newline at end of file