lib/psd.rb in psd-3.2.2 vs lib/psd.rb in psd-3.2.3

- old
+ new

@@ -128,34 +128,10 @@ .later(:parse) .ignore(:width, :height) ) end - # Export the current file to a new PSD. This may or may not work. - def export(file) - parse! unless parsed? - - # Create our file for writing - outfile = File.open(file, 'w') - - # Reset the file pointer - @file.seek 0 - @header.write outfile - @file.seek @header.num_bytes, IO::SEEK_CUR - - # Nothing in the header or resources we want to bother with changing - # right now. Write it straight to file. - outfile.write @file.read(@resources.end_of_section - @file.tell) - - # Now, the changeable part. Layers and masks. - layer_mask.export(outfile) - - # And the rest of the file (merged image data) - outfile.write @file.read - outfile.flush - end - private def ensure_header header # Header is always required end @@ -171,6 +147,6 @@ return unless @layer_mask.nil? @layer_mask = LayerMask.new(@file, @header, @opts) @layer_mask.skip end -end \ No newline at end of file +end