MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / ToPNG

Method ToPNG

rEFIt_UEFI/libeg/XImage.cpp:381–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379 */
380
381EFI_STATUS XImage::ToPNG(UINT8** Data, UINTN& OutSize)
382{
383 size_t FileDataLength = 0;
384 FlipRB(); //commomly we want alpha for PNG, but not for screenshot, fix alpha there
385 UINT8 * PixelPtr = (UINT8 *)&PixelData[0];
386 unsigned Error = eglodepng_encode(Data, &FileDataLength, PixelPtr, Width, Height);
387 OutSize = FileDataLength;
388 if (Error) return EFI_UNSUPPORTED;
389 return EFI_SUCCESS;
390}
391
392/*
393 * fill XImage object by raster data described in SVG file

Callers 1

egScreenShotFunction · 0.80

Calls 1

eglodepng_encodeFunction · 0.85

Tested by

no test coverage detected