I need to manually find DPI of new image.
- $input_width = 361;
- $input_height = 413;
-
- $input_dpi_x = 72;
- $input_dpi_y = 72;
-
- $output_width = 800;
- $output_height = $input_height * $output_width / $input_width;
-
- $output_dpi_x = ceil(($input_dpi_x / $input_width) * $output_width);
- $output_dpi_y = ceil(($input_dpi_y / $input_height) * $output_y_res);
-
- echo "Outpud_dpi_x = " . $output_dpi_x;
- //Outpud_dpi_x = 160
Why when i resize image i get 802 instead of 800?
and i must use DPI dont ask why