#include "SkBitmap.h" #include "SkRect.h" void extractBitmapSubset(SkBitmap& originalBitmap, SkRect& subsetRect) { SkBitmap subsetBitmap; originalBitmap.extractSubset(&subsetBitmap, subsetRect); // ... do something with the subset bitmap ... }In this example, we extract a subset of the original bitmap object based on the specified subset rectangle. Once we have the subset bitmap, we can do something with it, such as display it on the screen or apply some image processing filters. The SkBitmap extractSubset method is part of the Skia Graphics Engine library, which is an open-source 2D graphics library with advanced features such as anti-aliasing, transparency, and image filtering. Skia is widely used in various applications, including Google Chrome, Android, and Flutter.