lib/vectory/datauri.rb in vectory-0.3.0 vs lib/vectory/datauri.rb in vectory-0.4.0

- old
+ new

@@ -16,9 +16,22 @@ data = Base64.strict_encode64(content) new("data:#{mimetype};base64,#{data}") end + def mime + match = parse_datauri(@content) + match[:mimetype] + end + + def height + to_vector.height + end + + def width + to_vector.width + end + def to_vector match = parse_datauri(@content) content = Base64.strict_decode64(match[:data]) image_class = detect_image_class(match[:mimetype])