/usr/lib/ruby/vendor_ruby/chunky_png/canvas/data_url_exporting.rb is in ruby-chunky-png 1.2.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | module ChunkyPNG
class Canvas
# Methods to export a canvas to a PNG data URL.
module DataUrlExporting
# Exports the canvas as a data url (e.g. data:image/png;base64,<data>) that can
# easily be used inline in CSS or HTML.
# @return [String] The canvas formatted as a data URL string.
def to_data_url
['data:image/png;base64,', to_blob].pack('A*m').gsub(/\n/, '')
end
end
end
end
|