-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add support for the decoding of jpeg2000 #7
base: master
Are you sure you want to change the base?
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.
Thanks, this looks like a good start! I left a few initial comments for now.
Any way I can help land this PR? |
@0rvar For sure, I think everything i've added so far has some major conceptual errors, and I'd still like to get this running smoothly so my current project can function without hiccups, if you have any ideas please feel free to throw them in! |
I've gotten jpeg2000 support working for my own test cases in my own fork, I have opened a chained PR to this branch in the fork: |
@@ -114,14 +114,41 @@ impl IconElement { | |||
let width = icon_type.pixel_width(); | |||
let height = icon_type.pixel_width(); | |||
match icon_type.encoding() { | |||
#[cfg(feature = "pngio")] |
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.
This line needs to be restored so that the crate can still build with the pngio
feature disabled.
decoder_test("loom.icns", IconType::RGBA32_512x512, "loom-512x512.png"); | ||
} | ||
|
||
|
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.
Minor style nitpick: Please remove the extra lines here (just one blank line between functions).
} | ||
|
||
#[test] | ||
fn decode_ic08(){ |
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.
This test seems to be failing for me when I run it locally. (Hmm, looks like I need to set up CI for this repo.)
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.
I'm not totally sure why, given the JP2000 decoding is working (which I'm not totally sure of as I tested it with a jp2000 file which I created of type ic10 and it didn't seem to function)
I believe that the test should've passed but I also have not spent much time in this repo overall.
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.
I just now enabled CI testing for this repo. If you rebase, we should be able to see the results of that.
Note: I'm not that experienced in rust (this is essentially my first real project in the language) so let me know if I did anything wrong.
Also, I believe that the test case is in the jp2000, however, it is different than all the other test cases, I simply have no idea how to create my own .icns file containing a jp2k checkmark.