I need to extract the middle frame of a gif animation.
Imagemagick:
convert C:\\temp\\orig.gif -coalesce C:\\temp\\frame.jpg
generates
You are attempting to coalesce a single input image into single output image. What you got is what you asked for.
Instead you should "flatten" frames 0-4 into a single output image:
convert C:\temp\orig.gif[0-4] -flatten C:\temp\frame.jpg
If you use "-coalesce" you'll get 5 frames of output in frame-0.jpg through frame-4.jpg, the last of them being the image you wanted.