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

Jpeg 2000 Library for rust! #6

Open
CharlieS1103 opened this issue Aug 12, 2022 · 7 comments
Open

Jpeg 2000 Library for rust! #6

CharlieS1103 opened this issue Aug 12, 2022 · 7 comments

Comments

@CharlieS1103
Copy link

https://docs.rs/jp2k/latest/jp2k/
I'm not quite sure how this library works exactly, but from my very limited knowledge of rust, I think this should help?

@CharlieS1103
Copy link
Author

Would it be worth it for me to implement this library and make a PR? Or are you against using it because the maintainer states it is not memory safe?

@mdsteele
Copy link
Owner

Sure, if you can get it working and write some tests for it, a PR would be very welcome!

@CharlieS1103
Copy link
Author

CharlieS1103 commented Oct 21, 2022

Haven't quite had the motivation to get started on this, since I'm much less experienced than you, do you believe this would even be possible or nah?

@mdsteele
Copy link
Owner

Sure, I don't think it should be too hard of a change to make. Ideally the first step would be to find an example of an existing JPEG2000-based ICNS file to test on (although I'm not really sure where to find one). Then you'd want to change https://github.com/mdsteele/rust-icns/blob/master/src/element.rs#L120 to call out to the JPEG2000 library to decode and return the image (instead of returning an error), and then try running the library on your test file (e.g. with cargo run --example icns2png path/to/file.icns).

@CharlieS1103
Copy link
Author

Alright thanks, this gives me some slight security in making this change. I might just be unlucky but the first icns file I tested this application on, contained a jpeg2000 file.

@CharlieS1103
Copy link
Author

I have created https://github.com/CharlieS1103/rust-icns and worked on it a little bit, obviously it's not working quite yet, I'm a bit confused on where to go from here to be entirely honest.

@CharlieS1103
Copy link
Author

Have no idea to test for it, but I think it might function?

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

No branches or pull requests

2 participants