On rpm -q ImageMagick ImageMagick-6.3.2.9-3 and other versions convert gif->jpeg inverts image if resolution changes convert x.gif -resize 300x y.jpeg In the same time if resolution is the same - everything is OK
Created attachment 158526 [details] original image
Created attachment 158527 [details] convert x.gif -resize 300x y.jpeg convert x.gif -resize 300x y.jpeg
Created attachment 158528 [details] convert x.gif z.jpeg convert x.gif z.jpeg
Original gif image has transparency which the jpeg format doesn't support at all. Relying on particular behavior in an undefined conversion is not recommended. If you look closely at the converted image the difference is not an inversion, but a value for the transparent region - without resize it is white, with resize it is black. If you want certainty in what you're doing I suggest making sure you don't have transparency in your image, or you expand your command line to create a base layer image of the color you'd like the background to be, then overlay the gif you are trying to convert and then run the resize and type conversion.