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

Updating Dependencies #56

Closed
daggy1234 opened this issue Oct 23, 2020 · 13 comments
Closed

Updating Dependencies #56

daggy1234 opened this issue Oct 23, 2020 · 13 comments

Comments

@daggy1234
Copy link
Contributor

I want to use photon with the rust image crate. However image v0.23.10 is not compatible with photon which is using image v0.21.1. I would love to see support for the latest image crate with photon as it offers great gif support!

When I tried manually, there were 188 issues present. A lot of the library has changed, so someone well versed with the library would have to do it.

@silvia-odwyer
Copy link
Owner

silvia-odwyer commented Oct 23, 2020

@daggy1234 Yes, I kept the image version at v0.21.1 because future versions contain significant breaking changes. However updating to v0.23.10 is definitely in the pipeline at some point, when the image crate contains new features which I'd like to incorporate into photon.

As to the GIF support, may I ask for more info on your use case? I've been interested in adding GIF support too, so I'd love to hear more about this! 😄

@daggy1234
Copy link
Contributor Author

Sure!
soo I was developing python bindings for photon because I love this library

https://github.com/Daggy1234/polaroid and due to versioning, I had to use the old Encoder and Decoder. While my implementation isn't the best, it works albeit very slowly. With v-.23.10 the new encoder is much faster and should make gifs useable. In addition, I believe gifs are natively supported for encoding and could possibly really improve and add gif support to photon. I primarily develop image API's and frequently manipulate gifs. WIth python bindings, I hoped to incorporate the rich feature set of photon into python which has some great image libraries. Thats about it. The new version would also considerably improve performance.

@daggy1234
Copy link
Contributor Author

Another key reason for a version bump is byte serialization.

Atm photon can only read and write from the fs, whereas in apps like a discord bot I am making in sereneity-rs, it makes a lot of sense to interact with buffers.

Latest image create has methods like to_bytes for DynamicImage that can greatly add some very cool Buffer functionality.

This buffer will work great for Js with nodejs Buffer as well.

I might try and start

@silvia-odwyer
Copy link
Owner

@daggy1234 Great points there. I'm planning to update the dependencies, when time allows, as there would be a great number of features that would be added due to the update. 😄 Indeed, it would be great to make use of to_bytes for Node.js also, as I was also planning on implementing support for Node.js' Buffer also.

@vicky5124
Copy link

The outdated dependencies make this crate impossible to get compiled with nightly versions over 2020-11-22 due to rust-lang/rust#44095 being stabilized.

@silvia-odwyer
Copy link
Owner

I've just updated the dependencies, and refactored the codebase. It has led to continued performance enhancements, and even faster execution times as expected, which is fantastic too. 😄

I'll commit the changes and push them. ✅

@daggy1234
Copy link
Contributor Author

Thats great! How would you feel about new helper methods?

@silvia-odwyer
Copy link
Owner

@daggy1234 That would be great! 👍 What helper methods do you have in mind?

@daggy1234
Copy link
Contributor Author

read from bytes
2) save to bytes

@vicky5124
Copy link

https://deps.rs/repo/github/silvia-odwyer/photon
It appears that some dependencies are still out of date, they should probably be updated too.

@silvia-odwyer
Copy link
Owner

@nitsuga5124 I'll make sure to update those too 👍

@silvia-odwyer
Copy link
Owner

@nitsuga5124 Just updated the remaining dependencies ✅ I couldn't seem to update the imageproc crate, because the latest version of that crate uses an unstable library feature, so I've kept it at version 0.21.0 for now

@daggy1234
Copy link
Contributor Author

This has been resolved so i'll close this then.

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

3 participants