Answer the question
In order to leave comments, you need to log in
How to change the number of image pixels (resolution)?
There is a folder with 3000 pictures in PNG.
They have Pixels/Inch
: 72 and dimensions 354px by 130px
At the output, you need to get the same pictures with Pixels/Inch
= 300, save the sizes.
The question is how to do this operation for at least one picture?
And is it possible to do this in PHP?
PNG - optional, you can get any other format as an output.
Answer the question
In order to leave comments, you need to log in
exec('convert -units PixelsPerInch originalImage -resample 300 outputIamge');
Available => Available
there is a lot of software for that
Of course, there are a lot of libraries for working with images, for example:
https://php.net/manual/ru/function.imageresolution.php
https://www.php.net/manual/ru/imagick.setresolution.php
doesn't an increase in Pixels/Inch entail an increase in the number of pixels?
Pixels/Inch is needed for the print. In the normal format, this is just an enlargement of the picture.
In other words, count how many pixels at your Pixels / Inch should be and increase the pictures, of course, with a loss of quality
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question