Skip to content
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

Made JPEG reading completely independent from Lepton encoding #129

Merged
merged 11 commits into from
Dec 21, 2024
Merged

Conversation

mcroomp
Copy link
Collaborator

@mcroomp mcroomp commented Dec 15, 2024

As part of the making the JPEG code useful outside of Lepton encoding, this change refactors the JPEG read code so that there is a single function "read_jpeg_file" that contains all the logic necessary to collect the information needed to reconstruct the JPEG image.

The write side still needs a bit of work to consolidate into a single API

@mcroomp mcroomp requested a review from Melirius December 15, 2024 16:55
src/jpeg/jpeg_read.rs Outdated Show resolved Hide resolved
src/jpeg/jpeg_read.rs Outdated Show resolved Hide resolved
@Melirius
Copy link
Collaborator

Melirius commented Dec 20, 2024

I suggest as a part of this nice refactoring to rename structure JPegHeader into JpegHeader, as well as enums JPegType and JPegDecodeStatus into JpegType and JpegDecodeStatus. I wonder why they are named like this :) JPEG is an acronym, so either all capitals, or consistent like this looks more logical to me.

mcroomp and others added 3 commits December 21, 2024 07:15
Co-authored-by: Ivan Siutsou <[email protected]>
Signed-off-by: Kristof Roomp <[email protected]>
Co-authored-by: Ivan Siutsou <[email protected]>
Signed-off-by: Kristof Roomp <[email protected]>
@mcroomp
Copy link
Collaborator Author

mcroomp commented Dec 21, 2024

I suggest as a part of this nice refactoring to rename structure JPegHeader into JpegHeader, as well as enums JPegType and JPegDecodeStatus into JpegType and JpegDecodeStatus. I wonder why they are named like this :) JPEG is an acronym, so either all capitals, or consistent like this looks more logical to me.

No idea about the original capitalization... I changed it to Jpeg

@mcroomp mcroomp merged commit eb53c11 into main Dec 21, 2024
3 checks passed
@mcroomp mcroomp deleted the jpeg2 branch December 21, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants