My understanding of the correct convert syntax is to put the input image right after "convert" for most situations.
In my case, I need to feed the input image from standard input (here I used a file just to ease the explanation). That's why I need the "jpg:-" syntax (IM cannot detect the file type because no extension is provided), and to my understanding it doesn't matter wether you put it after convert or before the end of the line.
But I thought I would at least try to help by seeing if I can reproduce your results. And mine don't seem to match yours.
The differences between my results and yours are probably due to the different *output* formats: in my application I need pnm, not png, and the bug could be in IM's pnm implementation.
I am not sure what your goal is, however. And curious why you need to use pnm and convert that in GIMP to png, when you can do it directly in IM?)
The reason why I need pnms is that I'm using IM to pre-process images (CAPTCHAs) that are later given to a CAPTCHA-breaking routine. This routine expects a pnm input, so that's why I need that unusual format, the -modulate and the -level stuff.
Since pnm files are not displayed by common browsers I needed a further reconversion to png to post here, so I used GIMP to do that conversion. I didn't use IM because, as I mentioned, I think that the bug could be IM's pnm implementation, so using IM would lead to misleading results.
Perhaps your pre 6.3.5 version was the one that had a bug in it and the current version is working correctly?
I tested quite a lot of versions before 6.3.5, up to 6.2, so I doubt the current version is working correctly. Either there was a very very long-standing bug (but strangely it wasn't documented in 6.3.5 changelog), or the behavior changed intentionally, for some rather odd reason.
Also might it be a GIMP problem in converting to png?
I doubt that too. Not only GIMP, but other applications also see the same differences between the pre-6.3.5 version and the post-6.3.5 version. Among those I tried ToyViewer and, of course, the CAPTCHA-breaking program I'm using.
I really think this is a IM issue.
Again sorry for sticking my nose in here.
No problem! I hope this helps anyway.