Skip to content

Commit

Permalink
add more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mcroomp committed Dec 15, 2024
1 parent 0c861b0 commit bd38b47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/jpeg/jpeg_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ use super::jpeg_position_state::JpegPositionState;
/// that are non-standard, in which case the function will return an error. This doesn't mean the JPEG
/// is corrupt, just that it is not supported for identical reconstruction.
///
/// The function returns the image data as a vector of `BlockBasedImage`, which contain the
/// DCT coefficients for each block in the image (we do perform a DCT, this this would be lossy).
/// In addition, we return a vector of `RestartSegmentCodingInfo` which contains the information
/// need to reconstruct a portion of the JPEG file starting at the given offset. This is useful
/// for baseline images where we can split the image into sections and decode them in parallel.
///
/// The callback function is called with the JPEG header information after it has been parsed, and
/// is useful for debugging or logging purposes. Progressive images will contain multiple scans and
/// call the callback multiple times.
Expand Down

0 comments on commit bd38b47

Please sign in to comment.