mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
revertDifxDrawableImage
Signed-off-by: WyxGitHub <878459285@qq.com>
This commit is contained in:
parent
712e95ee90
commit
4eeab930f3
@ -139,13 +139,12 @@ std::shared_ptr<Media::PixelMap> ImageConverter::BitmapToPixelMap(
|
||||
auto data = bitMap->GetPixels();
|
||||
opts.size.width = static_cast<int32_t>(bitMap->GetWidth());
|
||||
opts.size.height = static_cast<int32_t>(bitMap->GetHeight());
|
||||
opts.editable = true;
|
||||
auto pixelMap = Media::PixelMap::Create(opts);
|
||||
auto pixelMap = Media::PixelMap::Create(reinterpret_cast<uint32_t*>(data),
|
||||
opts.size.width * opts.size.height, opts);
|
||||
if (!pixelMap) {
|
||||
HILOGE("PixelMap is null, bitMap's Size = (%{public}d, %{public}d)", bitMap->GetWidth(), bitMap->GetHeight());
|
||||
return pixelMap;
|
||||
}
|
||||
pixelMap->WritePixels(reinterpret_cast<uint8_t*>(data), opts.size.width * opts.size.height * sizeof(uint32_t));
|
||||
return pixelMap;
|
||||
}
|
||||
#endif
|
||||
|
@ -112,16 +112,6 @@ public:
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t WritePixels(const uint8_t *source, const uint64_t &bufferSize)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static std::unique_ptr<PixelMap> Create(const InitializationOptions& opts)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static std::unique_ptr<PixelMap> Create(
|
||||
const uint32_t* colors, uint32_t colorLength, const InitializationOptions& opts)
|
||||
|
Loading…
Reference in New Issue
Block a user