We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f93952e commit 1c9befbCopy full SHA for 1c9befb
lib/dynamic_image/image_processor.rb
@@ -49,14 +49,8 @@ def convert(new_format)
49
50
# Returns the image data as a binary string.
51
def read
52
- tempfile = Tempfile.new(["dynamic_image", target_format.extension],
53
- binmode: true)
54
- tempfile.close
55
- write(tempfile.path)
56
- tempfile.open
57
- tempfile.read
58
- ensure
59
+ image.write_to_buffer(target_format.extension,
+ **target_format.save_options)
60
end
61
62
# Returns the image size as a Vector2d.
0 commit comments