SatDump 2.0.0-alpha-520736c72
Loading...
Searching...
No Matches
jpeg_utils.h File Reference

Utilities specific to JPEG manipulation (from memory) More...

#include "image.h"
#include <cstdint>
#include <vector>

Go to the source code of this file.

Functions

Image satdump::image::decompress_jpeg (uint8_t *data, int length, bool ignore_errors=false)
 Decompress 8-bit JPEG Data from memory.
std::vector< uint8_t > satdump::image::save_jpeg_mem (Image &img)
 Compress JPEG to memory.

Detailed Description

Utilities specific to JPEG manipulation (from memory)

Function Documentation

◆ decompress_jpeg()

Image satdump::image::decompress_jpeg ( uint8_t * data,
int length,
bool ignore_errors = false )

Decompress 8-bit JPEG Data from memory.

Parameters
datainput buffer
lengthbuffer size
ignore_errorsif true, ignore some errors (needed for a few satellites sending slightly malformed but still valid JPEGs)
Returns
the image

◆ save_jpeg_mem()

std::vector< uint8_t > satdump::image::save_jpeg_mem ( Image & img)

Compress JPEG to memory.

Parameters
imgthe image to compress (8-bit)
Returns
vector containing the JPEG stream