rust-icns icon indicating copy to clipboard operation
rust-icns copied to clipboard

Jpeg 2000 Library for rust!

Open CharlieS1103 opened this issue 3 years ago • 15 comments

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 avatar Aug 12 '22 04:08 CharlieS1103

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?

CharlieS1103 avatar Aug 20 '22 21:08 CharlieS1103

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

mdsteele avatar Aug 21 '22 01:08 mdsteele

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?

CharlieS1103 avatar Oct 21 '22 23:10 CharlieS1103

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).

mdsteele avatar Oct 22 '22 00:10 mdsteele

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 avatar Oct 22 '22 00:10 CharlieS1103

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 avatar Oct 24 '22 22:10 CharlieS1103

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

CharlieS1103 avatar Oct 25 '22 03:10 CharlieS1103