Closed craig410 closed 2 years ago
I have just discovered https://github.com/libvips/ruby-vips/commit/54dab5a84ddb9d173ba018db7910d1832c83ec76 and the issues it was discussed in. There doesn't appear to be a similar constant in the PHP wrapper, however
Image::thumbnail(__DIR__.'/input.pdf[dpi=150]', 1000, ['height'=>10_000_000])->writeToFile(__DIR__.'/output.png');
has the desired effect and behaves like -s 1000x
rather than -s 1000
Hi @craig410, that's right, just use a huge number for height.
Firstly, I may be misunderstanding something as I'm relatively new to vips.
It seems as though when thumbnailing PDFs using the PHP wrapper, the width parameter is being passed as height. It doesn't matter if the output type is PNG or JPEG and it only seems to be affecting PDF inputs. Tested with several different single-page A4 PDFs and consistently get the same results. Example PDF attached
Running vips version
vips-8.13.3-Tue Nov 1 09:09:54 UTC 2022
results in a thumbnail with a width of 1000px (expectedly)
while running with the PHP wrapper:
results in a thumbnail with a height of 1000px
test_fonts.pdf