MCPcopy Create free account
hub / github.com/Tencent/libpag / GetImageLayerRenderImage

Function GetImageLayerRenderImage

exporter/src/export/data/ImageBytes.cpp:70–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70static void GetImageLayerRenderImage(uint8* rgbaBytes, const AEGP_LayerH& layerHandle,
71 A_u_long srcStride, A_u_long dstStride, A_long width,
72 A_long height) {
73 const auto& Suites = GetSuites();
74 const auto& PluginID = GetPluginID();
75
76 AEGP_ItemH itemHandle = GetLayerItemH(layerHandle);
77 AEGP_RenderOptionsH renderOptions = nullptr;
78 Suites->RenderOptionsSuite3()->AEGP_NewFromItem(PluginID, itemHandle, &renderOptions);
79 if (renderOptions == nullptr) {
80 return;
81 }
82 GetRenderFrame(rgbaBytes, srcStride, dstStride, width, height, renderOptions);
83 Suites->RenderOptionsSuite3()->AEGP_Dispose(renderOptions);
84}
85
86void GetImageBytes(std::shared_ptr<PAGExportSession> session, pag::ImageBytes* imageBytes,
87 const AEGP_LayerH& layerHandle, bool isVideo, float factor) {

Callers 1

GetImageBytesFunction · 0.85

Calls 4

GetSuitesFunction · 0.85
GetPluginIDFunction · 0.85
GetLayerItemHFunction · 0.85
GetRenderFrameFunction · 0.85

Tested by

no test coverage detected