class EasyTag::Image
Attributes
data[RW]
desc[RW]
height[R]
mime_type[RW]
size[R]
type[RW]
type_s[RW]
width[R]
Public Class Methods
new(data)
click to toggle source
# File lib/easytag/image.rb, line 60 def initialize(data) self.data = data type = ImageType::None end
Public Instance Methods
data=(data)
click to toggle source
# File lib/easytag/image.rb, line 69 def data=(data) @data = data @size = @data.length begin spec = ImageSpec.new(StringIO.new(data, 'rb')) @mime_type = spec.content_type @width = spec.width @height = spec.height rescue ImageSpec::Error => e nil end end