code: func NewConvert(X *xgbutil.XUtil, img image.Image) *Image {
  	ximg := New(X, img.Bounds())
  
  	// I've attempted to optimize this loop.
  	// It actually takes more time to convert an image than to send the bytes
  	// over the wire. (I suspect 'copy' is super fast, which can be used in
  	// XDraw, whereas computing each pixel is super slow.)
  	// But how is image decoding so much faster than this? I'll have to
  	// investigate... Maybe the Color interface being used here is the real
  	// slow down.
  	switch concrete := img.(type) {
  	case *image.NRGBA:
  		convertNRGBA(ximg, concrete)
  	case *image.NRGBA64:
  		convertNRGBA64(ximg, concrete)
  	case *image.RGBA:
  		convertRGBA(ximg, concrete)
  	case *image.RGBA64:
  		convertRGBA64(ximg, concrete)
  	case *image.YCbCr:
  		convertYCbCr(ximg, concrete)
  	case *Image:
  		convertXImage(ximg, concrete)
  	default:
  		xgbutil.Logger.Printf("Converting image type %T the slow way. "+
  			"Optimization for this image type hasn't been added yet.", img)
  		convertImage(ximg, img)
  	}
  	return ximg
  }
docs: // NewConvert converts any image satisfying the image.Image interface to an
  // xgraphics.Image type.
  // If 'img' is an xgraphics.Image, it will be copied and a new image will
  // be returned.
  // Also, NewConvert attempts to optimize image conversion for some image
  // formats. (i.e., *image.RGBA.)