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
How to extract a image file from a zip file, and convert it to DataURL format? #213
Comments
You may try my Dauria package. However, it uses Node.js |
thank you, but I want to use Jszip in modern web browser, not Node.js. |
Here is a JSFiddle that converts an array buffer to a data URL and sets it as the source of an image: http://jsfiddle.net/Jan_Miksovsky/yy7Zs/ |
URL.createObjectURL(new Blob([zip.file('filename').asArrayBuffer()], {type : your/mime'})) |
thanks @ottoville it worked nice! |
I think maybe zipEntry.asBinary() and zipEntry.asArrayBuffer() are close to the correct answer, but I don't think them is the correct answer.
What can I use?
Thanks for answer!
The text was updated successfully, but these errors were encountered: