-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor out lossless JPEG code so that it can eventually be used independently #127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 12 out of 25 changed files in this pull request and generated no suggestions.
Files not reviewed (13)
- package/Lepton.Jpeg.Rust.nuspec: Language not supported
- src/structs/idct.rs: Evaluated as low risk
- src/jpeg/mod.rs: Evaluated as low risk
- src/jpeg/row_spec.rs: Evaluated as low risk
- src/structs/lepton_encoder.rs: Evaluated as low risk
- src/structs/lepton_decoder.rs: Evaluated as low risk
- src/structs/block_context.rs: Evaluated as low risk
- src/jpeg/jpeg_position_state.rs: Evaluated as low risk
- src/jpeg/block_based_image.rs: Evaluated as low risk
- src/jpeg/jpeg_write.rs: Evaluated as low risk
- src/structs/lepton_file_reader.rs: Evaluated as low risk
- src/jpeg/truncate_components.rs: Evaluated as low risk
- src/jpeg/bit_writer.rs: Evaluated as low risk
Comments skipped due to low confidence (2)
src/jpeg/jpeg_header.rs:48
- [nitpick] The error message 'invalid header encountered' is unclear. Suggest changing it to 'Invalid JPEG header encountered: expected 0xFF but found {header[0]}'.
return err_exit_code(ExitCode::UnsupportedJpeg, "invalid header encountered");
src/jpeg/jpeg_header.rs:61
- [nitpick] The error message 'segment is too short' is unclear. Suggest changing it to 'JPEG segment size is too short: expected at least 2 bytes but found {segment_size}'.
return err_exit_code(ExitCode::UnsupportedJpeg, "segment is too short");
Nice work! But large, so it'll take some time to review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally have checked. Nice work.
The JPEG code is useful for writing and reading JPEG files without any loss of fidelity. This can be useful for other things, such as lossless rotation, 8:1 thumbnails etc.
As a first step, remove the dependences on Lepton code and put into own module.