Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for FloydSteinberg (0.17 sec)

  1. src/image/draw/draw.go

    	Draw(dst Image, r image.Rectangle, src image.Image, sp image.Point)
    }
    
    // FloydSteinberg is a [Drawer] that is the [Src] [Op] with Floyd-Steinberg error
    // diffusion.
    var FloydSteinberg Drawer = floydSteinberg{}
    
    type floydSteinberg struct{}
    
    func (floydSteinberg) Draw(dst Image, r image.Rectangle, src image.Image, sp image.Point) {
    	clip(dst, &r, src, &sp, nil, nil)
    	if r.Empty() {
    		return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  2. src/image/draw/example_test.go

    		}
    	}
    	pi := image.NewPaletted(im.Bounds(), []color.Color{
    		color.Gray{Y: 255},
    		color.Gray{Y: 160},
    		color.Gray{Y: 70},
    		color.Gray{Y: 35},
    		color.Gray{Y: 0},
    	})
    
    	draw.FloydSteinberg.Draw(pi, im.Bounds(), im, image.Point{})
    	shade := []string{" ", "░", "▒", "▓", "█"}
    	for i, p := range pi.Pix {
    		fmt.Print(shade[p])
    		if (i+1)%width == 0 {
    			fmt.Print("\n")
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:07:05 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  3. src/image/gif/writer.go

    	// palette.Plan9 is used in place of a nil Quantizer.
    	Quantizer draw.Quantizer
    
    	// Drawer is used to convert the source image to the desired palette.
    	// draw.FloydSteinberg is used in place of a nil Drawer.
    	Drawer draw.Drawer
    }
    
    // EncodeAll writes the images in g to w in GIF format with the
    // given loop count and delay between frames.
    func EncodeAll(w io.Writer, g *GIF) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:38:09 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  4. src/image/draw/draw_test.go

    	b := image.Rect(0, 0, 640, 480)
    	// We can't represent 50% exactly, but 0x7fff / 0xffff is close enough.
    	src := &image.Uniform{color.Gray16{0x7fff}}
    	dst := image.NewPaletted(b, color.Palette{color.Black, color.White})
    	FloydSteinberg.Draw(dst, b, src, image.Point{})
    	nErr := 0
    	for y := b.Min.Y; y < b.Max.Y; y++ {
    		for x := b.Min.X; x < b.Max.X; x++ {
    			got := dst.Pix[dst.PixOffset(x, y)]
    			want := uint8(x+y) % 2
    			if got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:07:05 UTC 2023
    - 26K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Plan9", Var, 2},
    		{"WebSafe", Var, 2},
    	},
    	"image/draw": {
    		{"(Op).Draw", Method, 2},
    		{"Draw", Func, 0},
    		{"DrawMask", Func, 0},
    		{"Drawer", Type, 2},
    		{"FloydSteinberg", Var, 2},
    		{"Image", Type, 0},
    		{"Op", Type, 0},
    		{"Over", Const, 0},
    		{"Quantizer", Type, 2},
    		{"RGBA64Image", Type, 17},
    		{"Src", Const, 0},
    	},
    	"image/gif": {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  6. api/go1.2.txt

    pkg image/draw, type Quantizer interface { Quantize }
    pkg image/draw, type Quantizer interface, Quantize(color.Palette, image.Image) color.Palette
    pkg image/draw, var FloydSteinberg Drawer
    pkg image/gif, func Encode(io.Writer, image.Image, *Options) error
    pkg image/gif, func EncodeAll(io.Writer, *GIF) error
    pkg image/gif, type Options struct
    pkg image/gif, type Options struct, Drawer draw.Drawer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 18 04:36:59 UTC 2013
    - 1.9M bytes
    - Viewed (0)
Back to top