Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 44 for pix1 (0.04 sec)

  1. src/image/draw/example_test.go

    		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)
  2. src/image/jpeg/reader.go

    		yo := d.img3.YOffset(bounds.Min.X, y)
    		co := d.img3.COffset(bounds.Min.X, y)
    		for i, iMax := 0, bounds.Max.X-bounds.Min.X; i < iMax; i++ {
    			img.Pix[po+4*i+0] = d.img3.Y[yo+i]
    			img.Pix[po+4*i+1] = d.img3.Cb[co+i/cScale]
    			img.Pix[po+4*i+2] = d.img3.Cr[co+i/cScale]
    			img.Pix[po+4*i+3] = 255
    		}
    	}
    	return img, nil
    }
    
    // Decode reads a JPEG image from r and returns it as an [image.Image].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  3. src/image/gif/reader.go

    		nOffset := pass.start * dx // steps through the output as defined by pass.
    		for y := pass.start; y < dy; y += pass.skip {
    			copy(nPix[nOffset:nOffset+dx], m.Pix[offset:offset+dx])
    			offset += dx
    			nOffset += dx * pass.skip
    		}
    	}
    	m.Pix = nPix
    }
    
    // Decode reads a GIF image from r and returns the first embedded
    // image as an [image.Image].
    func Decode(r io.Reader) (image.Image, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:15:54 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  4. test/escape5.go

    	p, q := leaktoret2(&x)
    	gp = p
    	gp = q
    }
    
    func f5() {
    	var x int
    	leaktoret22(leaktoret2(&x))
    }
    
    func f6() {
    	var x int // ERROR "moved to heap: x"
    	px1, px2 := leaktoret22(leaktoret2(&x))
    	gp = px1
    	_ = px2
    }
    
    type T struct{ x int }
    
    func (t *T) Foo(u int) (*T, bool) { // ERROR "leaking param: t to result"
    	t.x += u
    	return t, true
    }
    
    func f7() *T {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  5. src/image/jpeg/writer_test.go

    // TestWriteGrayscale tests that a grayscale images survives a round-trip
    // through encode/decode cycle.
    func TestWriteGrayscale(t *testing.T) {
    	m0 := image.NewGray(image.Rect(0, 0, 32, 32))
    	for i := range m0.Pix {
    		m0.Pix[i] = uint8(i)
    	}
    	var buf bytes.Buffer
    	if err := Encode(&buf, m0, nil); err != nil {
    		t.Fatal(err)
    	}
    	m1, err := Decode(&buf)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:30 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  6. src/image/ycbcr.go

    	r = r.Intersect(p.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 &YCbCr{
    			SubsampleRatio: p.SubsampleRatio,
    		}
    	}
    	yi := p.YOffset(r.Min.X, r.Min.Y)
    	ci := p.COffset(r.Min.X, r.Min.Y)
    	return &YCbCr{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/tests/tpu_cluster_formation.mlir

      %pi0 = "tf.TPUPartitionedInputV2"(%arg0) {N = 2, partition_dims = [], _XlaSharding = "", is_packed = true} : (tensor<?xi32>) -> (tensor<?xi32>)
      %pi1 = "tf.TPUPartitionedInputV2"(%arg0) {N = 2, partition_dims = [], _XlaSharding = "", is_packed = true} : (tensor<?xi32>) -> (tensor<?xi32>)
      %1 = "tf.TPUReplicatedInput"(%pi0, %pi1) {is_mirrored_variable = true, is_packed = false} : (tensor<?xi32>, tensor<?xi32>) -> (tensor<?xi32>)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 22:03:30 UTC 2024
    - 53.9K bytes
    - Viewed (0)
  8. src/image/internal/imageutil/gen.go

    `
    
    const post = `
    	default:
    		return false
    	}
    	return true
    }
    `
    
    const sratioCase = `
    	case image.YCbCrSubsampleRatio%s:
    		for y, sy := y0, sp.Y; y != y1; y, sy = y+1, sy+1 {
    			dpix := dst.Pix[y*dst.Stride:]
    			yi := (sy-src.Rect.Min.Y)*src.YStride + (sp.X - src.Rect.Min.X)
    			%s
    
    				// This is an inline version of image/color/ycbcr.go's func YCbCrToRGB.
    				yy1 := int32(src.Y[yi]) * 0x10101
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 4.3K bytes
    - Viewed (0)
  9. src/image/gif/writer.go

    	bw.setup()
    	lzww := lzw.NewWriter(bw, lzw.LSB, litWidth)
    	if dx := b.Dx(); dx == pm.Stride {
    		_, e.err = lzww.Write(pm.Pix[:dx*b.Dy()])
    		if e.err != nil {
    			lzww.Close()
    			return
    		}
    	} else {
    		for i, y := 0, b.Min.Y; y < b.Max.Y; i, y = i+pm.Stride, y+1 {
    			_, e.err = lzww.Write(pm.Pix[i : i+dx])
    			if e.err != nil {
    				lzww.Close()
    				return
    			}
    		}
    	}
    	lzww.Close() // flush to bw
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:38:09 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  10. src/image/gif/writer_test.go

    	}
    }
    
    func BenchmarkEncodeRandomPaletted(b *testing.B) {
    	paletted := image.NewPaletted(image.Rect(0, 0, 640, 480), palette.Plan9)
    	rnd := rand.New(rand.NewSource(123))
    	for i := range paletted.Pix {
    		paletted.Pix[i] = uint8(rnd.Intn(256))
    	}
    
    	b.SetBytes(640 * 480 * 1)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		Encode(io.Discard, paletted, nil)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 19K bytes
    - Viewed (0)
Back to top