Method: Flms::AnimationLayer#retain_geometry

Defined in:
app/models/flms/animation_layer.rb

#retain_geometryObject

Pull geometry information out of uploaded file and store as attributes in model prior to save. See image_uploader.rb#get_geometry.



25
26
27
28
29
30
31
# File 'app/models/flms/animation_layer.rb', line 25

def retain_geometry
  geometry = self.image.normal.geometry
  if geometry
    self.image_width = geometry[0]
    self.image_height = geometry[1]
  end
end