Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
1.40/5 (3 votes)
See more:
how to zip image file using javascript..........................
Posted
Updated 26-Jul-18 20:48pm

Did you try Googling for? See, for instance "Create .Zip Files With JavaScript – JSZip"[^].
 
Share this answer
 
Comments
RaisKazi 16-Mar-12 6:51am    
My 5.
binijoy 16-Mar-12 7:07am    
i tried it

<script src="Jquery/jszip.js" type="text/javascript"></script>

<script type="text/javascript" language="javascript">
function Download(imgurl)
{

var zip = new JSZip();
zip.add("image.jpg","top_bg.jpg");
zip.add("smile.gif", "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=", {base64: true});
content = zip.generate();
location.href="data:application/zip;base64," + content;

}</script>
bt instead of R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=
i want to use the imageurl
Google is your friend, Try this:

Create .Zip Files With JavaScript – JSZip[^]

hope it helps :)
 
Share this answer
 
Comments
RaisKazi 16-Mar-12 6:51am    
My 5.
binijoy 16-Mar-12 7:14am    
i tried it <script src="Jquery/jszip.js" type="text/javascript"></script> <script type="text/javascript" language="javascript"> function Download(imgurl) { var zip = new JSZip(); zip.add("image.jpg","top_bg.jpg"); zip.add("smile.gif", "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=", {base64: true}); content = zip.generate(); location.href="data:application/zip;base64," + content; }</script> bt instead of R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs= i want to use the imageurl
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900