Line 10: |
Line 10: |
| | 3001 || [[#DecodeJpeg]] | | | 3001 || [[#DecodeJpeg]] |
| |- | | |- |
− | | 4001 || ShrinkJpeg | + | | 4001 || [17.0.0+] [[#ShrinkJpeg]] |
| + | |- |
| + | | 4002 || [18.0.0+] [[#ShrinkJpegEx]] |
| |} | | |} |
| | | |
Line 17: |
Line 19: |
| | | |
| The type-0x46 buffer contains the RGBA8 image data. The type-0x5 buffer contains the input JPEG data. | | The type-0x46 buffer contains the RGBA8 image data. The type-0x5 buffer contains the input JPEG data. |
| + | |
| + | == ShrinkJpeg == |
| + | Takes an input u32 '''width''', an input u32 '''height''', an input [[Capture_services#ScreenShotDecodeOption|ScreenShotDecodeOption]], a type-0x46 output buffer, a type-0x5 input buffer, and an output u64 size. |
| + | |
| + | Iterates the JPEG quality levels in order 98, 95, 90, 80, 70, 60, 50, 40, 30, 20, 10 to 0, tries to compress the input JPEG in the type-0x5, into the output buffer as a JPEG with the current quality and scaled_width = width/2 and scaled_height = height/2. |
| + | If it succeeds, or the failure isn't because the supplied buffer isn't large enough, returns, else retries with the next lower quality preset until 0. |
| + | |
| + | == ShrinkJpegEx == |
| + | Takes an input u32 '''width''', an input u32 '''height''', an input u32 '''quality''', an input [[Capture_services#ScreenShotDecodeOption|ScreenShotDecodeOption]], a type-0x46 output buffer, a type-0x5 input buffer, and an output u64 size. |
| + | |
| + | Tries to compress the JPEG in the type-0x5 buffer into the type-0x46 buffer with the supplied width, height and quality as output settings. |
| | | |
| [[Category:Services]] | | [[Category:Services]] |