Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewGray (0.11 sec)

  1. src/image/jpeg/scan.go

    package jpeg
    
    import (
    	"image"
    )
    
    // makeImg allocates and initializes the destination image.
    func (d *decoder) makeImg(mxx, myy int) {
    	if d.nComp == 1 {
    		m := image.NewGray(image.Rect(0, 0, 8*mxx, 8*myy))
    		d.img1 = m.SubImage(image.Rect(0, 0, d.width, d.height)).(*image.Gray)
    		return
    	}
    
    	h0 := d.comp[0].h
    	v0 := d.comp[0].v
    	hRatio := h0 / d.comp[1].h
    	vRatio := v0 / d.comp[1].v
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 25 00:46:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. src/image/image.go

    		Stride: p.Stride,
    		Rect:   r,
    	}
    }
    
    // Opaque scans the entire image and reports whether it is fully opaque.
    func (p *Gray) Opaque() bool {
    	return true
    }
    
    // NewGray returns a new [Gray] image with the given bounds.
    func NewGray(r Rectangle) *Gray {
    	return &Gray{
    		Pix:    make([]uint8, pixelBufferLength(1, r, "Gray")),
    		Stride: 1 * r.Dx(),
    		Rect:   r,
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 34.9K bytes
    - Viewed (0)
  3. src/image/draw/draw_test.go

    	}
    	for y := 0; y < 16; y++ {
    		for x := 0; x < 16; x++ {
    			m.Cr[y*m.CStride+x] = uint8(y * 0x11)
    		}
    	}
    	return m
    }
    
    func vgradGray() image.Image {
    	m := image.NewGray(image.Rect(0, 0, 16, 16))
    	for y := 0; y < 16; y++ {
    		for x := 0; x < 16; x++ {
    			m.Set(x, y, color.Gray{uint8(y * 0x11)})
    		}
    	}
    	return m
    }
    
    func vgradMagenta() image.Image {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:07:05 UTC 2023
    - 26K bytes
    - Viewed (0)
  4. src/image/png/reader.go

    	}
    	switch d.cb {
    	case cbG1, cbG2, cbG4, cbG8:
    		bitsPerPixel = d.depth
    		if d.useTransparent {
    			nrgba = image.NewNRGBA(image.Rect(0, 0, width, height))
    			img = nrgba
    		} else {
    			gray = image.NewGray(image.Rect(0, 0, width, height))
    			img = gray
    		}
    	case cbGA8:
    		bitsPerPixel = 16
    		nrgba = image.NewNRGBA(image.Rect(0, 0, width, height))
    		img = nrgba
    	case cbTC8:
    		bitsPerPixel = 24
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 26K bytes
    - Viewed (0)
Back to top