mirror of
https://github.com/pion/mediadevices.git
synced 2025-10-05 08:36:55 +08:00
12 lines
178 B
Go
12 lines
178 B
Go
package frame
|
|
|
|
import (
|
|
"bytes"
|
|
"image"
|
|
"image/jpeg"
|
|
)
|
|
|
|
func decodeMJPEG(frame []byte, width, height int) (image.Image, error) {
|
|
return jpeg.Decode(bytes.NewReader(frame))
|
|
}
|