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

Support progressive image rendering #5

Open
cfcs opened this issue Oct 30, 2017 · 3 comments
Open

Support progressive image rendering #5

cfcs opened this issue Oct 30, 2017 · 3 comments

Comments

@cfcs
Copy link
Collaborator

cfcs commented Oct 30, 2017

Hi!

What do you think about adding support for progressive parsing/rendering?

Here is a demonstration: https://blog.codinghorror.com/progressive-image-rendering/

I'm mostly interested in the non-interlacing variant (due to memory consumption concerns), and it appears to me that would be fairly simple to implement for most of the formats, but it would require an API change (or extension).

I can try to come up with a PoC in a week or two if you are interested.

@rlepigre
Copy link
Owner

I thought about that at some point, but is it really necessary given that the internet has now a reasonable speed mostly everywhere?

If you want to implement this, then go for it, but I'd like the current interface to remain the same as it fits my needs. :-)

@cfcs
Copy link
Collaborator Author

cfcs commented Oct 30, 2017

It's not so much about speed, it's more that a bitmap representation quickly ends up eating up a lot of ram, and since I'm dealing with unikernels that do not have dynamic memory allocation (or memory ballooning) I need to pre-allocate the maximum memory up front.

Here's a screenshot of the PNG renderer working as a Xen unikernel, and with an SDL target, btw: https://github.com/cfcs/eye-of-mirage/#latest-screenshot :)

Alright, I was thinking to add a chunk-based reader to the Image.mli ReadImage signature (defaulting to just being synonymous with parsefile at first), would that be OK?

@rlepigre
Copy link
Owner

OK, I see. Alright 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

2 participants