S
S
Sergey Sokolov2019-12-02 21:49:24
linux
Sergey Sokolov, 2019-12-02 21:49:24

How to reduce image size with minimum available memory?

Server with a small amount of RAM.
Users sometimes upload obscenely large images, such as 8000x8000,
and the PHP handler crashes when trying to imagecreatefrompng()
Output requires 1280x720.
It would be nice to use some utility that requires a minimum of memory to reduce the size of too large pictures to about acceptable size. Before transferring to PHP and imagecreatefrompng()
Tell me, please, the easiest-fast utilities that can reduce the size of images in jpeg, gif, png, webp, say, exactly 2 or 4 times?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Frolov, 2019-12-03
@Digiport

imagemagick CLI
www.ioncannon.net/linux/81/5-imagemagick-command-l...

R
Roman Mirilaczvili, 2019-12-03
@2ord

1. There is libepeg only for JPEG.
2. Although, in conditions of low memory, it is possible to process images in a queue with a limited number of processors.
3. Or is it better to use third-party services?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question