static AndroidBitmapInfo info_for_pixmap(const SkPixmap& pmap) { // If any of these values is invalid (e.g. set to zero), the info will be rejected by // AndroidBitmap_compress.
AndroidBitmapInfo info {
.width = SkTFitsIn<uint32_t>(pmap.width()) ? SkToU32(pmap.width()) : 0,
.height = SkTFitsIn<uint32_t>(pmap.height()) ? SkToU32(pmap.height()) : 0,
.stride = SkTFitsIn<uint32_t>(pmap.rowBytes()) ? SkToU32(pmap.rowBytes()) : 0,
.format = SkNDKConversions::toAndroidBitmapFormat(pmap.colorType())
};
namespace SkPngEncoder {
std::unique_ptr<SkEncoder> Make(SkWStream*, const SkPixmap&, const Options&) {
SkDEBUGFAIL("Making an encoder is not supported via the NDK"); return nullptr;
}
bool Encode(SkWStream*, const SkYUVAPixmaps&, const SkColorSpace*, const Options&) {
SkDEBUGFAIL("encoding a YUVA pixmap is not supported via the NDK"); returnfalse;
}
std::unique_ptr<SkEncoder> Make(SkWStream*, const SkPixmap&, const Options&) {
SkDEBUGFAIL("Making an encoder is not supported via the NDK"); return nullptr;
}
std::unique_ptr<SkEncoder> Make(SkWStream*, const SkYUVAPixmaps&, const SkColorSpace*, const Options&) {
SkDEBUGFAIL("Making an encoder is not supported via the NDK"); return nullptr;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.