microsoft / microsoft/lepton_jpeg_rust

Support for prefix garbage?

Open
#98 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
182
Forks
17
Avg merge
19h 46m
Merged PRs (30d)
1

Description

As I can see, LEPTON_HEADER_PREFIX_GARBAGE_MARKER is defined, but is not used (self.write_lepton_jpeg_garbage_if_needed(&mut mrw, false)?; is always with false), and Lepton file encoded with -embedded=XXX will exit the library by return err_exit_code(ExitCode::BadLeptonFile, "unknown data found"); Even if not supporting prefix garbage in encode, we can support decoding such files without difficulties.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing uses of LEPTON_HEADER_PREFIX_GARBAGE_MARKER and write_lepton_jpeg_garbage_if_needed, especially the call that passes false. Check how decoding handles -embedded=XXX and where ExitCode::BadLeptonFile is returned. Done means Lepton files with prefix garbage decode successfully without the "unknown data found" error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.