Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Maximum supported image dimension is 65500 pixels `/home/user/processed.img' @ error/jpeg.c/JPEGErrorHandler/340
At the same time it uses 1.84GB of RAM for a couple seconds.
I guess that it attempts to make it wider by multiplying both height and width by 200 (desired width), and ends up with 360000x200 image, which is obviously too large. Probably this is a bug because resulting image is expected to fill the desired area, and it doesn't have to produce such a large image during this process.
Actually your point is valid and I'm sorry I didn't understand docs correctly, it works as expected so this thread can be closed.
I wanted image (smaller/larger) to fill 300x200 while maintaining aspect ratio and avoiding crop but cropping when necessary to keep height less than 600px (in this case width will have to remain 300), but I think I should re-read docs myself and handle this edge case somehow, this is out of this thread's scope anyway.