Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I just started learning vb.net please tell me how we reduce jpg file size at Encrypt time and at it restore at same size when we Decrypt it.please Help.
Posted

 
Share this answer
 
You have to create a new image each time you change the jpeg quality, but you cannot increase the quality once it's been reduced. You can change the compression value (higher comp=lower quality) but the image will remain degraded. You'll need to maintain an unchanged original image and work from it at least until you're satisfied with the quality of the new (compressed) image.

You might try serializing the images instead and see if the resulting file is significantly smaller than the combined file sizes of the images. If you try this, it'd likely be beneficial to place all the images in an ImageList and just serialize the list.

That still leaves the encryption issue, so you'd have to encrypt the resulting file.
 
Share this answer
 
What do you mean by encrypt or decrypt ? you need to google for the code, but you can make a jpg smaller by lowering it's quality. Once it's low quality, you can't make it high quality again.
 
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