Altering efficient scaling SkImages while working with skottie animation

27 views
Skip to first unread message

Duong Nguyen

unread,
Oct 23, 2024, 9:29:16 AMOct 23
to skia-discuss
Hi, I am working with skottie animation on android native application
I found that when using high resolution image assets, it takes lots of time to scaling SkImage:
``` (SkResources.cpp)
            if (bm.tryAllocPixels(info, info.minRowBytes()) &&
                image->scalePixels(bm.pixmap(),
                                   SkSamplingOptions(SkFilterMode::kLinear, SkMipmapMode::kNearest),
                                   SkImage::kAllow_CachingHint)) {
                image = bm.asImage();
            }

```
Is there any way better to down scale the images. I'm looking for a solution as the downsample as decode bitmap on android https://developer.android.com/topic/performance/graphics/load-bitmap. Am I go in a properly direction? Sorry for my intermediate English
Reply all
Reply to author
Forward
0 new messages