Quote:
This algorithm compresses the image to 100 KB.
No, this code do not compress the image to given size, it downscale the image. The reduced size is only a secondary effect.
Quote:
I'm trying to find an image compression algorithm
You are not looking for a compression algorithm jpeg images are already compressed.
What you are looking for is a library that will allow you to resize the images.