| 222 | } |
| 223 | |
| 224 | Valdi::Result<Ref<Image>> Image::makeFromBitmap(const Valdi::Ref<Valdi::IBitmap>& bitmap, bool shouldCopy) { |
| 225 | auto info = bitmap->getInfo(); |
| 226 | |
| 227 | auto data = bitmapToData(bitmap, info, shouldCopy); |
| 228 | if (!data) { |
| 229 | return data.moveError(); |
| 230 | } |
| 231 | |
| 232 | return makeFromPixelsData(info, data.value()); |
| 233 | } |
| 234 | |
| 235 | Valdi::Ref<Valdi::IBitmap> Image::getBitmap() { |
| 236 | auto imageInfo = _skImage->imageInfo(); |
nothing calls this directly
no test coverage detected