If I understand correctly, the PDF->image step is not done by LaTeX, but by an external call to convert (part of ImageMagick suite). So maybe this is off-topic, but...
Basically, once you have installed it, you should be able to use this command (at least in Linux, I think it will be the same in other OSs):
convert -density 300 -background white -alpha remove -alpha off pdf-file.pdf page.png
and you'll have your pages at 300 dpi, named page-0.png, page-1.png and so on.
Notice that the latest convert can have problems. Be sure to read https://stackoverflow.com/questions/42928765/convertnot-authorized-aaaa-error-constitute-c-readimage-453 and https://github.com/ImageMagick/ImageMagick/issues/396 and then if you have errors edit your /etc/ImageMagick-6/policy.xml to say:
<policy domain="resource" name="memory" value="4GiB"/>
<policy domain="resource" name="map" value="4GiB"/>
<policy domain="resource" name="width" value="128KP"/>
<policy domain="resource" name="height" value="128KP"/>
<policy domain="resource" name="area" value="1.28GP"/>
<policy domain="resource" name="disk" value="8GiB"/>
<policy domain="coder" rights="read|write" pattern="PS" />
<policy domain="coder" rights="read|write" pattern="EPS" />
<policy domain="coder" rights="read|write" pattern="PDF" />
<policy domain="coder" rights="read|write" pattern="XPS" />
In the original files, the rights were none and the limits much lower, which will hinder execution for a medium-size PDF file.
convertuses a different name on windows https://stackoverflow.com/a/38163913/2777074 – samcarter_is_at_topanswers.xyz May 09 '23 at 09:56