class FFmpeg::Frame
- FFmpeg::Frame
- Reference
- Object
Defined in:
ffmpeg/frame.crConstructors
-
.new(width : Int, height : Int, pixel_bytes : Int)
DEPRECATED specify pixel format instead of byte size
- .new(width : Int, height : Int, pixel_format : LibAV::PixelFormat, align : Int = 1, buffer : Bytes | Nil = nil)
- .new(source : FFmpeg::Frame)
-
.new(canvas : StumpyCore::Canvas)
canvas helpers
- .new
Instance Method Summary
-
#allocate_buffer(width : Int, height : Int, pixel_bytes : Int)
DEPRECATED specify pixel format instead of byte size
- #allocate_buffer(width : Int, height : Int, pixel_format : LibAV::PixelFormat, align : Int = 1, buffer : Bytes | Nil = nil)
- #buffer : Bytes
-
#copy_to(frame : FFmpeg::Frame)
copies the image buffer to a new frame
-
#crop(top : Int32, left : Int32, bottom : Int32, right : Int32) : FFmpeg::Frame
crop helper
- #finalize
- #height
- #key_frame? : Bool
- #pixel_format : PixelFormat
-
#quick_crop(top : Int32, left : Int32, bottom : Int32, right : Int32) : FFmpeg::Frame | Nil
crops the frame for use with scaler to combine cropping in a single operation
-
#to_canvas : StumpyCore::Canvas
a very simple way to get a stumpy canvas from a frame also very inefficient so I don't recommend using in production
- #to_unsafe : Pointer(FFmpeg::LibAV::Util::AVFrame)
- #width
Constructor Detail
def self.new(width : Int, height : Int, pixel_bytes : Int)
#
DEPRECATED specify pixel format instead of byte size
def self.new(width : Int, height : Int, pixel_format : LibAV::PixelFormat, align : Int = 1, buffer : Bytes | Nil = nil)
#
Instance Method Detail
def allocate_buffer(width : Int, height : Int, pixel_bytes : Int)
#
DEPRECATED specify pixel format instead of byte size
def allocate_buffer(width : Int, height : Int, pixel_format : LibAV::PixelFormat, align : Int = 1, buffer : Bytes | Nil = nil)
#
def quick_crop(top : Int32, left : Int32, bottom : Int32, right : Int32) : FFmpeg::Frame | Nil
#
crops the frame for use with scaler to combine cropping in a single operation
def to_canvas : StumpyCore::Canvas
#
a very simple way to get a stumpy canvas from a frame also very inefficient so I don't recommend using in production