Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for NumColors (0.18 sec)

  1. src/image/gif/writer.go

    	bw.close()   // flush to e.w
    }
    
    // Options are the encoding parameters.
    type Options struct {
    	// NumColors is the maximum number of colors used in the image.
    	// It ranges from 1 to 256.
    	NumColors int
    
    	// Quantizer is used to produce a palette with size NumColors.
    	// palette.Plan9 is used in place of a nil Quantizer.
    	Quantizer draw.Quantizer
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:38:09 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  2. src/image/gif/fuzz_test.go

    			return
    		}
    		img, typ, err := image.Decode(bytes.NewReader(b))
    		if err != nil || typ != "gif" {
    			return
    		}
    		for q := 1; q <= 256; q++ {
    			var w bytes.Buffer
    			err := Encode(&w, img, &Options{NumColors: q})
    			if err != nil {
    				t.Fatalf("failed to encode valid image: %s", err)
    			}
    			img1, err := Decode(&w)
    			if err != nil {
    				t.Fatalf("failed to decode roundtripped image: %s", err)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 15:57:34 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  3. src/cmd/vendor/github.com/google/pprof/internal/report/stacks.go

    	}
    }
    
    func (s *StackSet) assignColors() {
    	// Assign different color indices to different packages.
    	const numColors = 1048576
    	for i, src := range s.Sources {
    		pkg := packageName(src.FullName)
    		h := sha256.Sum256([]byte(pkg))
    		index := binary.LittleEndian.Uint32(h[:])
    		s.Sources[i].Color = int(index % numColors)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 15:19:53 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. src/image/gif/reader_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	img, err := Decode(bytes.NewReader(data))
    	if err != nil {
    		t.Fatal(err)
    	}
    	err = Encode(io.Discard, img, &Options{NumColors: 1})
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:15:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"GIF.Delay", Field, 0},
    		{"GIF.Disposal", Field, 5},
    		{"GIF.Image", Field, 0},
    		{"GIF.LoopCount", Field, 0},
    		{"Options", Type, 2},
    		{"Options.Drawer", Field, 2},
    		{"Options.NumColors", Field, 2},
    		{"Options.Quantizer", Field, 2},
    	},
    	"image/jpeg": {
    		{"(FormatError).Error", Method, 0},
    		{"(UnsupportedError).Error", Method, 0},
    		{"Decode", Func, 0},
    		{"DecodeConfig", Func, 0},
    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/gif, func EncodeAll(io.Writer, *GIF) error
    pkg image/gif, type Options struct
    pkg image/gif, type Options struct, Drawer draw.Drawer
    pkg image/gif, type Options struct, NumColors int
    pkg image/gif, type Options struct, Quantizer draw.Quantizer
    pkg log/syslog (freebsd-386-cgo), const LOG_ALERT Priority
    pkg log/syslog (freebsd-386-cgo), const LOG_AUTH Priority
    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