libnx  v4.6.0
Functions
capsdc.h File Reference

Jpeg Decoder (caps:dc) service IPC wrapper. More...

#include "../types.h"
#include "../sf/service.h"
#include "../services/caps.h"

Go to the source code of this file.

Functions

Result capsdcInitialize (void)
 Initialize caps:dc.
 
void capsdcExit (void)
 Exit caps:dc.
 
ServicecapsdcGetServiceSession (void)
 Gets the Service for caps:dc.
 
Result capsdcDecodeJpeg (u32 width, u32 height, const CapsScreenShotDecodeOption *opts, const void *jpeg, size_t jpeg_size, void *out_image, size_t out_image_size)
 Decodes a jpeg buffer into RGBX. More...
 
Result capsdcShrinkJpeg (u32 width, u32 height, const CapsScreenShotDecodeOption *opts, const void *jpeg, size_t jpeg_size, void *out_jpeg, size_t out_jpeg_size, u64 *out_result_size)
 Shrinks a jpeg's dimensions by 2.
 

Detailed Description

Jpeg Decoder (caps:dc) service IPC wrapper.

Only available on [4.0.0+].

Note
Only holds one session that is occupied by capsrv.
Author
Behemoth

Function Documentation

◆ capsdcDecodeJpeg()

Result capsdcDecodeJpeg ( u32  width,
u32  height,
const CapsScreenShotDecodeOption opts,
const void *  jpeg,
size_t  jpeg_size,
void *  out_image,
size_t  out_image_size 
)

Decodes a jpeg buffer into RGBX.

Parameters
[in]widthImage width.
[in]heightImage height.
[in]optsCapsScreenShotDecodeOption.
[in]jpegJpeg image input buffer.
[in]jpeg_sizeInput image buffer size.
[out]out_imageRGBA8 image output buffer.
[in]out_image_sizeOutput image buffer size, should be at least large enough for RGBA8 width x height.