def read(hash)
      self.scale = hash.delete('scale').sub(/x$/, '').to_i unless hash['scale'].nil?

      KNOWN_KEYS.each do |key|
        value = hash.delete(key.to_s.dasherize)
        next if value.nil?
        self.send "#{key}=".to_sym, value
      end

      self.attributes = hash

      return self
    end
def read(hash)
      self.scale = hash.delete('scale').sub(/x$/, '').to_i unless hash['scale'].nil?

      KNOWN_KEYS.each do |key|
        value = hash.delete(key.to_s.dasherize)
        next if value.nil?
        self.send "#{key}=".to_sym, value
      end

      self.attributes = hash

      return self
    end
Initialize a new ResourceImage

 @param  [Hash]
         the initial attribute values

 Read from hash

 @param  [Hash]
         the hash to deserialize

 @return [ResourceImage]