-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
accept buffers as input #53
Comments
It would be great to have this feature. I'm personally interested in it because I would like to use |
I am currently on my way to implement this. |
Thanks for letting me know. For now I've tried to write files as a workaround and it works, here is an example. |
Hello, any news on this one? We would like to integrate this into our puppeteer workflow, where we are currently using pixelmatch. |
Unfortunately no news, need to sit and implement a feature from scratch, if you have interest in trying this out – feel free to open a PR |
Maybe I will get around checking this out. Any info to point me in the right direction? |
The idea is simple but implementation may be a bit tricky especially for C part. We need to accept stdin buffer with an encoded image, then decode it in memory and everything else odiff already has implemented. (there is no reason to support raw images because there would be not so much benefit) |
Ok, yes sounds simple. But I am afraid I have no knowledge of OCAML or Reason. I will therefore probably not be able to help out. |
I’ve been thinking about this but in fact I can not understand benefit of using especially buffer in your case. You are getting encoded image from puppeteer it means that browser already made some work on encoding it. Why not to write the image in file system and after use odiff? You will be able to also provide screenshots as test artifacts after. |
We would save IO time I guess. But at least we could try to use the filesystem. |
You still want to produce the base as artifact I assume |
As mentioned above, I'm also interested in this feature. You can find our plugin source code here:
I'm not sure about potential IO gains but supporting Buffer would make things simpler for us. |
@dmtrKovalenko https://github.com/eWert-Online/OSnap/blob/master/lib/OSnap_Diff/ReadPng.c I would be able to work on "upstreaming" it if you are interested. |
Wow that is really cool, we can leverage this as well, thanks Torben! |
any progress on this? |
@jasan-s there is a pr partially open but a bit abandoned. Any help or new PR is welcoem |
I'm trying to integrate odiff into a third-party lib. It would be great if the compare function would also accept buffers instead of paths. This would save the round trip to write a buffer to disk in some use cases.
The text was updated successfully, but these errors were encountered: