Home
last modified time | relevance | path

Searched refs:pixelMap (Results 1 – 25 of 338) sorted by relevance

12345678910>>...14

/foundation/multimedia/image_framework/plugins/common/libs/image/libwebpplugin/src/
Dwebp_encoder.cpp71 uint32_t WebpEncoder::AddImage(Media::PixelMap &pixelMap) in AddImage() argument
80 pixelMaps_.push_back(&pixelMap); in AddImage()
100 Media::PixelMap &pixelMap = *(pixelMaps_[0]); in FinalizeEncode() local
105 errorCode = SetEncodeConfig(pixelMap, webpConfig, webpPicture); in FinalizeEncode()
114 errorCode = DoEncode(pixelMap, webpConfig, webpPicture); in FinalizeEncode()
137 bool WebpEncoder::CheckEncodeFormat(Media::PixelMap &pixelMap) in CheckEncodeFormat() argument
139 PixelFormat pixelFormat = GetPixelFormat(pixelMap); in CheckEncodeFormat()
164 bool isOpaque = IsOpaque(pixelMap); in CheckEncodeFormat()
179 bool WebpEncoder::DoTransform(Media::PixelMap &pixelMap, char* dst, int componentsNum) in DoTransform() argument
183 PixelFormat pixelFormat = GetPixelFormat(pixelMap); in DoTransform()
[all …]
/foundation/multimedia/image_framework/plugins/common/libs/image/libwebpplugin/include/
Dwebp_encoder.h31 uint32_t AddImage(Media::PixelMap &pixelMap) override;
37 bool CheckEncodeFormat(Media::PixelMap &pixelMap);
38 …uint32_t SetEncodeConfig(Media::PixelMap &pixelMap, WebPConfig &webpConfig, WebPPicture &webpPictu…
39 uint32_t DoEncode(Media::PixelMap &pixelMap, WebPConfig &webpConfig, WebPPicture &webpPicture);
40 uint32_t DoEncodeForICC(Media::PixelMap &pixelMap);
41 bool DoTransform(Media::PixelMap &pixelMap, char* dst, int componentsNum);
44 Media::ColorSpace GetColorSpace(Media::PixelMap &pixelMap);
45 Media::PixelFormat GetPixelFormat(Media::PixelMap &pixelMap);
46 Media::AlphaType GetAlphaType(Media::PixelMap &pixelMap);
47 bool GetIcc(Media::PixelMap &pixelMap);
[all …]
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/
Dimage_pixel_map_test.cpp45 std::unique_ptr<PixelMap> pixelMap = std::make_unique<PixelMap>(); in ConstructPixmap() local
51 pixelMap->SetImageInfo(info); in ConstructPixmap()
67 pixelMap->SetPixelsAddr(buffer, nullptr, bufferSize, AllocatorType::HEAP_ALLOC, nullptr); in ConstructPixmap()
68 return pixelMap; in ConstructPixmap()
75 std::unique_ptr<PixelMap> pixelMap = std::make_unique<PixelMap>(); in ConstructBigPixmap() local
81 pixelMap->SetImageInfo(info); in ConstructBigPixmap()
83 int32_t bufferSize = pixelMap->GetByteCount(); in ConstructBigPixmap()
96 pixelMap->SetPixelsAddr(buffer, nullptr, bufferSize, AllocatorType::HEAP_ALLOC, nullptr); in ConstructBigPixmap()
97 return pixelMap; in ConstructBigPixmap()
111 PixelMap pixelMap; variable
[all …]
Dbuffer_source_stream_test.cpp58 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
60 ASSERT_NE(pixelMap.get(), nullptr);
62 const uint8_t *buffer = pixelMap->GetPixels();
63 uint32_t size = pixelMap->GetCapacity();
85 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
87 ASSERT_NE(pixelMap.get(), nullptr);
90 uint32_t size = pixelMap->GetCapacity();
112 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
114 ASSERT_NE(pixelMap.get(), nullptr);
116 const uint8_t *buffer = pixelMap->GetPixels();
[all …]
Dimage_pixel_map_switch_test.cpp213 PixelMap pixelMap; variable
220 uint32_t ret = pixelMap.SetImageInfo(info, isReused);
238 PixelMap pixelMap; variable
245 uint32_t ret = pixelMap.SetImageInfo(info, isReused);
263 PixelMap pixelMap; variable
270 pixelMap.SetImageInfo(info, isReused);
271 const uint8_t* ret = pixelMap.GetPixel8(300, 400);
289 PixelMap pixelMap; variable
296 pixelMap.SetImageInfo(info, isReused);
297 const uint16_t* ret = pixelMap.GetPixel16(300, 400);
[all …]
Dbuffer_packer_stream_test.cpp57 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
59 ASSERT_NE(pixelMap.get(), nullptr);
60 uint8_t *data = const_cast<uint8_t *>(pixelMap->GetPixels());
62 uint32_t size = pixelMap->GetCapacity();
86 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
88 ASSERT_NE(pixelMap.get(), nullptr);
89 uint8_t *data = const_cast<uint8_t *>(pixelMap->GetPixels());
90 const uint8_t *buffer = pixelMap->GetPixels();
115 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
117 ASSERT_NE(pixelMap.get(), nullptr);
[all …]
Dimage_source_raw_test.cpp65 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
67 ASSERT_NE(pixelMap, nullptr);
68 ASSERT_NE(pixelMap.get(), nullptr);
69 ASSERT_EQ(pixelMap->GetAlphaType(), AlphaType::IMAGE_ALPHA_TYPE_OPAQUE);
74 …t64_t packSize = OHOS::ImageSourceUtil::PackImage(IMAGE_OUTPUT_DNG_FILE_PATH, std::move(pixelMap));
101 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
103 ASSERT_NE(pixelMap, nullptr);
104 ASSERT_NE(pixelMap.get(), nullptr);
105 ASSERT_EQ(pixelMap->GetAlphaType(), AlphaType::IMAGE_ALPHA_TYPE_OPAQUE);
110 …t64_t packSize = OHOS::ImageSourceUtil::PackImage(IMAGE_OUTPUT_DNG_FILE_PATH, std::move(pixelMap));
[all …]
Dpost_proc_test.cpp65 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
67 ASSERT_NE(pixelMap.get(), nullptr);
71 errorCode = postProc.DecodePostProc(decodeOpts, *(pixelMap.get()), finalOutputStep);
102 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
104 ASSERT_NE(pixelMap.get(), nullptr);
108 errorCode = postProc.DecodePostProc(decodeOpts, *(pixelMap.get()), finalOutputStep);
140 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
142 ASSERT_NE(pixelMap.get(), nullptr);
146 errorCode = postProc.DecodePostProc(decodeOpts, *(pixelMap.get()), finalOutputStep);
178 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
[all …]
Dimage_source_gif_test.cpp122 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
125 ASSERT_NE(pixelMap.get(), nullptr);
133 pixelMap->GetARGB32Color(posX, posY, color);
134 uint8_t alpha = pixelMap->GetARGB32ColorA(color);
135 uint8_t red = pixelMap->GetARGB32ColorR(color);
136 uint8_t green = pixelMap->GetARGB32ColorG(color);
137 uint8_t blue = pixelMap->GetARGB32ColorB(color);
171 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
173 ASSERT_NE(pixelMap.get(), nullptr);
181 pixelMap->GetARGB32Color(posX, posY, color);
[all …]
Dimage_source_bmp_test.cpp65 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
67 ASSERT_NE(pixelMap.get(), nullptr);
68 ASSERT_EQ(pixelMap->GetAlphaType(), AlphaType::IMAGE_ALPHA_TYPE_OPAQUE);
73 int64_t packSize = PackImage(IMAGE_OUTPUT_BMP_FILE_PATH, std::move(pixelMap));
100 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
102 ASSERT_NE(pixelMap.get(), nullptr);
103 ASSERT_EQ(pixelMap->GetAlphaType(), AlphaType::IMAGE_ALPHA_TYPE_OPAQUE);
108 int64_t packSize = PackImage(IMAGE_OUTPUT_BMP_FILE_PATH, std::move(pixelMap));
135 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
137 ASSERT_NE(pixelMap.get(), nullptr);
[all …]
Dimage_source_wbmp_test.cpp64 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
66 ASSERT_NE(pixelMap.get(), nullptr);
67 ASSERT_EQ(pixelMap->GetAlphaType(), AlphaType::IMAGE_ALPHA_TYPE_OPAQUE);
93 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
95 ASSERT_NE(pixelMap.get(), nullptr);
96 ASSERT_EQ(pixelMap->GetAlphaType(), AlphaType::IMAGE_ALPHA_TYPE_OPAQUE);
122 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
124 ASSERT_NE(pixelMap.get(), nullptr);
125 ASSERT_EQ(pixelMap->GetAlphaType(), AlphaType::IMAGE_ALPHA_TYPE_OPAQUE);
151 std::unique_ptr<PixelMap> pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
[all …]
Dimage_source_svg_test.cpp66 auto pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
68 ASSERT_NE(pixelMap.get(), nullptr);
75 auto packSize = PackImage(outName, std::move(pixelMap));
109 auto pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
111 ASSERT_NE(pixelMap.get(), nullptr);
118 auto packSize = PackImage(outName, std::move(pixelMap));
154 auto pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
156 ASSERT_NE(pixelMap.get(), nullptr);
163 auto packSize = PackImage(outName, std::move(pixelMap));
199 auto pixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); variable
[all …]
Dwebp_encoder_test.cpp76 auto pixelMap = Media::PixelMap::Create(opts); variable
77 webpEncoder->AddImage(*pixelMap.get());
133 auto pixelMap = Media::PixelMap::Create(opts); variable
134 pixelMap->SetPixelsAddr(nullptr, nullptr, 10, AllocatorType::HEAP_ALLOC, nullptr);
135 webpEncoder->AddImage(*pixelMap.get());
162 auto pixelMap = Media::PixelMap::Create(opts); variable
163 webpEncoder->AddImage(*pixelMap.get());
190 auto pixelMap = Media::PixelMap::Create(opts); variable
191 webpEncoder->AddImage(*pixelMap.get());
218 auto pixelMap = Media::PixelMap::Create(opts); variable
[all …]
Dinterface_test.cpp117 PixelMap *pixelMap = nullptr; variable
118 PixelMapManager pixelMapManager(pixelMap);
132 PixelMap *pixelMap = nullptr; variable
133 PixelMapManager pixelMapManager(pixelMap);
147 PixelMap *pixelMap = nullptr; variable
148 PixelMapManager pixelMapManager(pixelMap);
161 PixelMap *pixelMap = nullptr; variable
162 PixelMapManager pixelMapManager(pixelMap);
176 PixelMap *pixelMap = nullptr; variable
177 PixelMapManager pixelMapManager(pixelMap);
[all …]
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/common/src/
Dpixel_map_parcel.cpp63 unique_ptr<PixelMap> pixelMap = make_unique<PixelMap>(); in CreateFromParcel() local
64 if (pixelMap == nullptr) { in CreateFromParcel()
127 uint32_t ret = pixelMap->SetImageInfo(imgInfo); in CreateFromParcel()
133 pixelMap->SetPixelsAddr(base, context, bufferSize, allocType, nullptr); in CreateFromParcel()
134 return pixelMap; in CreateFromParcel()
137 bool PixelMapParcel::WriteToParcel(PixelMap* pixelMap, OHOS::MessageParcel& data) in WriteToParcel() argument
139 if (pixelMap == nullptr) { in WriteToParcel()
142 int32_t bufferSize = pixelMap->GetByteCount(); in WriteToParcel()
148 if (!data.WriteInt32(pixelMap->GetWidth())) { in WriteToParcel()
149 … HiLog::Error(LABEL, "write pixel map width:[%{public}d] to parcel failed.", pixelMap->GetWidth()); in WriteToParcel()
[all …]
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/converter/src/
Dpost_proc.cpp42 uint32_t PostProc::DecodePostProc(const DecodeOptions &opts, PixelMap &pixelMap, FinalOutputStep fi… in DecodePostProc() argument
45 pixelMap.GetImageInfo(srcImageInfo); in DecodePostProc()
47 GetDstImageInfo(opts, pixelMap, srcImageInfo, dstImageInfo); in DecodePostProc()
48 uint32_t errorCode = ConvertProc(opts.CropRect, dstImageInfo, pixelMap, srcImageInfo); in DecodePostProc()
56 if (!RotatePixelMap(opts.rotateDegrees, pixelMap)) { in DecodePostProc()
63 if (!ScalePixelMap(opts.desiredSize, pixelMap)) { in DecodePostProc()
69 pixelMap.GetImageInfo(info); in DecodePostProc()
71 …int targetWidth = (pixelMap.GetWidth() * opts.fitDensity + (info.baseDensity >> 1)) / info.baseDen… in DecodePostProc()
72 …int targetHeight = (pixelMap.GetHeight() * opts.fitDensity + (info.baseDensity >> 1)) / info.baseD… in DecodePostProc()
76 if (!ScalePixelMap(size, pixelMap)) { in DecodePostProc()
[all …]
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/converter/include/
Dpost_proc.h31 uint32_t DecodePostProc(const DecodeOptions &opts, PixelMap &pixelMap,
33 …uint32_t ConvertProc(const Rect &cropRect, ImageInfo &dstImageInfo, PixelMap &pixelMap, ImageInfo …
36 bool RotatePixelMap(float rotateDegrees, PixelMap &pixelMap);
37 bool ScalePixelMap(const Size &size, PixelMap &pixelMap);
38 bool ScalePixelMap(float scaleX, float scaleY, PixelMap &pixelMap);
39 bool TranslatePixelMap(float tX, float tY, PixelMap &pixelMap);
40 bool CenterScale(const Size &size, PixelMap &pixelMap);
47 void GetDstImageInfo(const DecodeOptions &opts, PixelMap &pixelMap,
49 uint32_t PixelConvertProc(ImageInfo &dstImageInfo, PixelMap &pixelMap, ImageInfo &srcImageInfo);
53 bool Transform(BasicTransformer &trans, const PixmapInfo &input, PixelMap &pixelMap);
[all …]
/foundation/multimedia/image_framework/plugins/common/libs/image/libextplugin/src/
Dext_encoder.cpp72 uint32_t ExtEncoder::AddImage(Media::PixelMap &pixelMap) in AddImage() argument
74 pixelmap_ = &pixelMap; in AddImage()
82 static SkImageInfo ToSkInfo(Media::PixelMap *pixelMap) in ToSkInfo() argument
85 pixelMap->GetImageInfo(info); in ToSkInfo()
90 if (pixelMap->InnerGetGrColorSpacePtr() != nullptr) { in ToSkInfo()
91 colorSpace = pixelMap->InnerGetGrColorSpacePtr()->ToSkColorSpace(); in ToSkInfo()
97 static uint32_t RGBToRGBx(Media::PixelMap *pixelMap, SkImageInfo &skInfo, TmpBufferHolder &holder) in RGBToRGBx() argument
101 static_cast<uint8_t*>(pixelMap->GetWritablePixels()), in RGBToRGBx()
102 pixelMap->GetCapacity(), pixelMap->GetWidth()*pixelMap->GetHeight(), in RGBToRGBx()
110 static uint32_t BuildSkBitmap(Media::PixelMap *pixelMap, SkBitmap &bitmap, in BuildSkBitmap() argument
[all …]
/foundation/multimedia/av_session/frameworks/native/session/src/
Davsession_pixel_map_adapter.cpp52 const std::shared_ptr<Media::PixelMap>& pixelMap = std::make_shared<Media::PixelMap>(); in ConvertFromInner() local
53 pixelMap->SetImageInfo(imageInfo); in ConvertFromInner()
61pixelMap->SetPixelsAddr(dataAddr, nullptr, dataSize, Media::AllocatorType::CUSTOM_ALLOC, nullptr); in ConvertFromInner()
70 auto result = Media::PixelMap::Create(*pixelMap, options); in ConvertFromInner()
73 pixelMap->scale(scaleRatio, scaleRatio); in ConvertFromInner()
79 const std::shared_ptr<Media::PixelMap>& pixelMap) in ConvertToInner() argument
81 CHECK_AND_RETURN_RET_LOG(pixelMap != nullptr, nullptr, "invalid parameter"); in ConvertToInner()
82 originalPixelMapBytes_ = pixelMap->GetByteCount(); in ConvertToInner()
83 originalWidth_ = pixelMap->GetWidth(); in ConvertToInner()
84 originalHeight_ = pixelMap->GetHeight(); in ConvertToInner()
[all …]
/foundation/window/window_manager/snapshot/test/unittest/
Dsnapshot_utils_test.cpp143 std::shared_ptr<Media::PixelMap> pixelMap = DisplayManager::GetInstance().GetScreenshot(id); variable
144 ASSERT_NE(nullptr, pixelMap);
145 ASSERT_EQ(true, SnapShotUtils::WriteToJpegWithPixelMap(defaultFile_, *pixelMap));
156 std::shared_ptr<Media::PixelMap> pixelMap = DisplayManager::GetInstance().GetScreenshot(id); variable
157 ASSERT_NE(nullptr, pixelMap);
159 .width = pixelMap->GetWidth(),
160 .height = pixelMap->GetHeight(),
161 .stride = pixelMap->GetRowBytes(),
162 .format = pixelMap->GetPixelFormat(),
163 .data = pixelMap->GetPixels()
[all …]
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/render/
Drs_image_base.cpp199 …llingAndCachePixelMap(Parcel& parcel, std::shared_ptr<Media::PixelMap>& pixelMap, uint64_t uniqueI… in UnmarshallingAndCachePixelMap() argument
201 if (pixelMap != nullptr) { in UnmarshallingAndCachePixelMap()
206 } else if (RSMarshallingHelper::Unmarshalling(parcel, pixelMap)) { in UnmarshallingAndCachePixelMap()
207 if (pixelMap && !pixelMap->IsEditable()) { in UnmarshallingAndCachePixelMap()
209 RSImageCache::Instance().CachePixelMap(uniqueId, pixelMap); in UnmarshallingAndCachePixelMap()
236 sk_sp<SkImage>& img, std::shared_ptr<Media::PixelMap>& pixelMap, void*& imagepixelAddr) argument
239 …std::shared_ptr<Drawing::Image>& img, std::shared_ptr<Media::PixelMap>& pixelMap, void*& imagepixe…
269 pixelMap = RSImageCache::Instance().GetPixelMapCache(uniqueId);
271 …uniqueId, pixelMap ? pixelMap->GetWidth() : 0, pixelMap ? pixelMap->GetHeight() : 0, pixelMap != n…
272 if (!UnmarshallingAndCachePixelMap(parcel, pixelMap, uniqueId)) {
[all …]
Drs_pixel_map_util.cpp156 explicit PixelMapReleaseContext(std::shared_ptr<PixelMap> pixelMap) : pixelMap_(pixelMap) {} in PixelMapReleaseContext()
177 sk_sp<SkImage> RSPixelMapUtil::ExtractSkImage(std::shared_ptr<Media::PixelMap> pixelMap) in ExtractSkImage() argument
179 if (!pixelMap) { in ExtractSkImage()
183 pixelMap->GetImageInfo(imageInfo); in ExtractSkImage()
185 …SkPixmap skPixmap(skImageInfo, reinterpret_cast<const void*>(pixelMap->GetPixels()), pixelMap->Get… in ExtractSkImage()
186 …eturn SkImage::MakeFromRaster(skPixmap, PixelMapReleaseProc, new PixelMapReleaseContext(pixelMap)); in ExtractSkImage()
190 std::shared_ptr<Media::PixelMap> pixelMap) in ExtractDrawingImage() argument
192 if (!pixelMap) { in ExtractDrawingImage()
196 pixelMap->GetImageInfo(imageInfo); in ExtractDrawingImage()
201 bitmap.SetPixels((void*)pixelMap->GetPixels()); in ExtractDrawingImage()
/foundation/arkui/ace_engine/frameworks/core/components_ng/image_provider/
Dpixel_map_image_object.cpp39 auto pixelMap = data->GetPixelMapData(); in Create() local
40 if (!pixelMap) { in Create()
46 pixelMap, src, SizeF(pixelMap->GetWidth(), pixelMap->GetHeight())); in Create()
/foundation/arkui/ace_engine/interfaces/inner_api/drawable_descriptor/
Dimage_converter.cpp59 const std::shared_ptr<Media::PixelMap>& pixelMap) in PixelMapToBitmap() argument
61 auto data = pixelMap->GetPixels(); in PixelMapToBitmap()
63 SkColorType colorType = ImageConverter::PixelFormatToSkColorType(pixelMap->GetPixelFormat()); in PixelMapToBitmap()
64 SkAlphaType alphaType = ImageConverter::AlphaTypeToSkAlphaType(pixelMap->GetAlphaType()); in PixelMapToBitmap()
65 …auto imageInfo = SkImageInfo::Make(pixelMap->GetWidth(), pixelMap->GetHeight(), colorType, alphaTy… in PixelMapToBitmap()
77 auto pixelMap = Media::PixelMap::Create(reinterpret_cast<uint32_t*>(data), in BitmapToPixelMap() local
79 return pixelMap; in BitmapToPixelMap()
/foundation/window/window_manager/wmserver/src/window_snapshot/
Dsnapshot_controller.cpp45 std::shared_ptr<Media::PixelMap> pixelMap; in GetSnapshot() local
47 auto task = [this, &pixelMap, &surfaceNode, token] () { in GetSnapshot()
50 pixelMap = targetNode->GetSnapshot(); in GetSnapshot()
62 if (pixelMap == nullptr) { in GetSnapshot()
64 bool snapSucc = SurfaceDraw::GetSurfaceSnapshot(surfaceNode, pixelMap, SNAPSHOT_TIMEOUT_MS); in GetSnapshot()
71 snapshot.SetPixelMap(pixelMap); in GetSnapshot()

12345678910>>...14