rich-pixels
rich-pixels copied to clipboard
Add staticmethod to parse base64 encoded images
Summary of changes:
- Add
from_base64_imagestatic method - Add sample base64 image as a text file
- Test is not passing :(
Feel free to close this, but I actually had to write this up for my project, so I figured I'd open a PR here too.
Also could not quite figure out how to write the test with syrupy...
You need to run pytest --snapshot-update to save the snapshot to disk (and check it looks correct).
Then, every time that test runs in the future, it'll validate that the output doesn't change compared to that snapshot.
Ahhh yeah thanks!! That worked perfectly, and all tests passed 🚀
It should have generated a new snapshot image, which you'll also need to push up to this PR so that when other people run your test, it checks the output of the test against that snapshot :)
There you go! Thanks for the quick response! ⚡ ⚡