You have to use BGR channel if format is jpeg:
https://github.com/irstv/orbisgis-server/blob/master/wms/src/main/java/org/orbisgis/server/wms/AbstractGetHandler.java#L248

If you not do this it will raise this:
```
javax.imageio.IIOException: Invalid argument to native writeImage
	at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeImage(Native Method)
	at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeOnThread(JPEGImageWriter.java:1058)
	at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:360)
	at javax.imageio.ImageWriter.write(ImageWriter.java:615)
	at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)
	at javax.imageio.ImageIO.write(ImageIO.java:1578)
	at org.orbisgis.core.map.export.MapImageWriter.write(MapImageWriter.java:222)
	at org.orbisgis.view.map.MapEditor$ExportRenderingIntoFile.run(MapEditor.java:762)
	at org.orbisgis.view.background.Job.run(Job.java:74)
	at org.orbisgis.view.background.RunnableBackgroundJob.run(RunnableBackgroundJob.java:71)
	at java.lang.Thread.run(Thread.java:724)
```