func (p *RGB48) SubImage(r image.Rectangle) image.Image {
	r = r.Intersect(p.M.Rect)
	// If r1 and r2 are Rectangles, r1.Intersect(r2) is not guaranteed to be inside
	// either r1 or r2 if the intersection is empty. Without explicitly checking for
	// this, the Pix[i:] expression below can panic.
	if r.Empty() {
		return &RGB48{}
	}
	i := p.PixOffset(r.Min.X, r.Min.Y)
	return new(RGB48).Init(
		p.M.Pix[i:],
		p.M.Stride,
		r,
	)
}
// SubImage returns an image representing the portion of the image p visible
// through r. The returned value shares pixels with the original image.
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
// SubImage returns an image representing the portion of the image p visible // through r . The returned value shares pixels with the original image .
func (p *RGB48) SubImage(r image.Rectangle) image.Image {
	r = r.Intersect(p.M.Rect)
	if r.Empty() {
		return &RGB48{}
	}
	i := p.PixOffset(r.Min.X, r.Min.Y)
	return new(RGB48).Init(
		p.M.Pix[i:],
		p.M.Stride,
		r,
	)
}
func ( p * RGB48 ) SubImage ( r image . Rectangle ) image . Image { r = r . Intersect ( p . M . Rect ) if r . Empty ( ) { return & RGB48 { } } i := p . PixOffset ( r . Min . X , r . Min . Y ) return new ( RGB48 ) . Init ( p . M . Pix [ i : ] , p . M . Stride , r , ) }
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
SubImage returns an image representing the portion of the image p visible through r . The returned value shares pixels with the original image .
// If r1 and r2 are Rectangles, r1.Intersect(r2) is not guaranteed to be inside // either r1 or r2 if the intersection is empty. Without explicitly checking for // this, the Pix[i:] expression below can panic.