/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file.
*/ #include"src/codec/SkCodecImageGenerator.h"
static SkImageInfo adjust_info(SkCodec* codec, std::optional<SkAlphaType> at) {
SkASSERT(at != kOpaque_SkAlphaType);
SkImageInfo info = codec->getInfo(); if (at.has_value()) { // If a specific alpha type was requested, use that.
info = info.makeAlphaType(*at);
} elseif (kUnpremul_SkAlphaType == info.alphaType()) { // Otherwise, prefer premul over unpremul (this produces better filtering in general)
info = info.makeAlphaType(kPremul_SkAlphaType);
} if (SkEncodedOriginSwapsWidthHeight(codec->getOrigin())) {
info = SkPixmapUtils::SwapWidthHeight(info);
} return info;
}
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.