Periodically I have a fight with ImageMagick, and sometimes IM wins and sometimes I win. Have found that the conversions to PNG and to JPG do not always produce the same results. Also that the sequence of parameters sometimes affects the results. There is a ton of documentation and it's not always fun reading. I do not have a command line that I can recommend, that always works. Anytime I need to extract images from a PDF, it becomes lLots of experiments based on a specific PDF file and that parameters it was created with, and the desired image target parameters.
Have worked this out for specific combinations of PDF creation apps + specific target image sizes, but not for the general case.
Sorry, not great news.
As you wish.