Open GEEKiDoS opened 2 years ago
Would be great to have a way to create image from raw decoded pixel buffer.
@samizdatco currently rust based Image
creates SKImage only using from_encoded_data
function. Maybe there is a way to add an options
object to loadImage
function that accepts something like js sharp when it receives raw images:
sharp(frame, {
raw: {
width: 1920,
height: 1080,
channels: 4,
premultiplied: true
}
})
As I know Skia itself supports creating SkImages from pixel buffers if you provide SkImageInfo. Would be a great addition to this library, because currently there is no way to draw frames from ffmpeg for example without double decoding :(
I'm working with games and need to load the dds or textures in assetbundle(unity) into
Image
. But seems there's no method that I can just feed decoded pixels into it.