Module: DynamicImage::ImageProcessor::Frames
- Included in:
- DynamicImage::ImageProcessor
- Defined in:
- lib/dynamic_image/image_processor/frames.rb
Overview
ImageProcessor::Frames
Support for animated GIF and WebP images, which vips represents as a single tall image with a page-height of
one frame. Operations are applied to each frame and the results reassembled.
Instance Method Summary collapse
-
#frame(index) ⇒ DynamicImage::ImageProcessor
Extracts a single frame from a multi-frame image.
-
#frame_count ⇒ Integer
Returns the number of frames.
Instance Method Details
#frame(index) ⇒ DynamicImage::ImageProcessor
Extracts a single frame from a multi-frame image.
14 15 16 |
# File 'lib/dynamic_image/image_processor/frames.rb', line 14 def frame(index) apply extract_frame(index) end |
#frame_count ⇒ Integer
Returns the number of frames. Still images have one.
21 22 23 |
# File 'lib/dynamic_image/image_processor/frames.rb', line 21 def frame_count image.get("height") / size.y end |