The following code fragments demonstrate going both directions:
Code:
public WPIImage processImage(WPIColorImage colorImg) {
// Example of getting access to the underlying IplImage of a WPIImage
WPIImageWrapper wrapper = new WPIImageWrapper(colorImg);
IplImage iplImage = wrapper.getIplImage();
// Example of getting the BufferedImage from a IplImage and constructing
// a new WPIColorImage
WPIColorImage newColorImg = new WPIColorImage(iplImage.getBufferedImage());
return newColorImg;
}