We just implemented a feature where our users can upload photos. We are re-sizing what the user has uploaded into thumbnail and an 800x600 "display" size.
The problem we are having is that this operation seems to be taking up a lot of memory on our server. We are using Django-imagekit to do this and there seems to be documented problems with excessive memory usage.
We are running django on a Heroku server. In case this factors in, we are using postgresql for data and elasticsearch for search as well.
Thanks so much!
Resizing allows you to make your image smaller or larger without cutting anything out. Resizing alters the image's dimensions, which typically affects the file size and image quality. The most common reason for resizing photos is to reduce the size of large files to make them easier to email or share online.
BeFunky is a great free image resize tool that offers a lot of options. You can resize your image by width or height or by percentage scale.
Resizing images is a critical pre-processing step in computer vision. Principally, deep learning models train faster on small images. A larger input image requires the neural network to learn from four times as many pixels, and this increase the training time for the architecture.
I don't know what django-imagekit
offers but you could just use PIL and when saving an upload image resize it to the sizes that you need.
http://effbot.org/imagingbook/image.htm
I have used and it works well PythonMagick and you could also try wand it is a ctypes-based ImagedMagick binding library for Python
I have used gd2 with ruby, which works pretty well. It's written in C, so it is fast and shouldn't take a whole lot of memory. It looks like there are Python bindings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With