Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for rectangle (0.27 sec)

  1. src/image/gif/writer_test.go

    			continue
    		}
    		if _, err := Decode(buf); err != nil {
    			t.Errorf("Decode: sr=%v: %v", sr, err)
    		}
    	}
    }
    
    type offsetImage struct {
    	image.Image
    	Rect image.Rectangle
    }
    
    func (i offsetImage) Bounds() image.Rectangle {
    	return i.Rect
    }
    
    func TestEncodeWrappedImage(t *testing.T) {
    	m0, err := readImg("../testdata/video-001.gif")
    	if err != nil {
    		t.Fatalf("readImg: %v", err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 19K bytes
    - Viewed (0)
  2. src/image/gif/reader.go

    	//	imageBounds := image.Rect(0, 0, d.width, d.height)
    	//	if !frameBounds.In(imageBounds) { etc }
    	// but the semantics of the Go image.Rectangle type is that r.In(s) is true
    	// whenever r is an empty rectangle, even if r.Min.X > s.Max.X. Here, we
    	// want something stricter.
    	//
    	// Note that, by construction, left >= 0 && top >= 0, so we only have to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:15:54 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  3. platforms/jvm/language-java/src/integTest/groovy/org/gradle/api/tasks/compile/JavaCompileIntegrationTest.groovy

                compileJava {
                    options.compilerArgs = ['-sourcepath', files('src/main/java').asPath]
                }
            '''
            file('src/main/java/Square.java') << 'public class Square extends Rectangle {}'
    
            when:
            fails 'compileJava'
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 31 20:20:39 UTC 2024
    - 39.6K bytes
    - Viewed (0)
  4. src/image/gif/reader_test.go

    		}
    	}
    }
    
    // See golang.org/issue/22237
    func TestDecodeMemoryConsumption(t *testing.T) {
    	const frames = 3000
    	img := image.NewPaletted(image.Rectangle{Max: image.Point{1, 1}}, palette.WebSafe)
    	hugeGIF := &GIF{
    		Image:    make([]*image.Paletted, frames),
    		Delay:    make([]int, frames),
    		Disposal: make([]byte, frames),
    	}
    	for i := 0; i < frames; i++ {
    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/image/gif/writer.go

    		return
    	}
    
    	b := pm.Bounds()
    	if b.Min.X < 0 || b.Max.X >= 1<<16 || b.Min.Y < 0 || b.Max.Y >= 1<<16 {
    		e.err = errors.New("gif: image block is too large to encode")
    		return
    	}
    	if !b.In(image.Rectangle{Max: image.Point{e.g.Config.Width, e.g.Config.Height}}) {
    		e.err = errors.New("gif: image block is out of bounds")
    		return
    	}
    
    	transparentIndex := -1
    	for i, c := range pm.Palette {
    		if c == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:38:09 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  6. src/image/jpeg/reader_test.go

    		}
    		if i == 0 {
    			i = 1
    		} else {
    			i *= 2
    		}
    	}
    }
    
    // check checks that the two pix data are equal, within the given bounds.
    func check(bounds image.Rectangle, pix0, pix1 []byte, stride0, stride1 int) error {
    	if stride0 <= 0 || stride0%8 != 0 {
    		return fmt.Errorf("bad stride %d", stride0)
    	}
    	if stride1 <= 0 || stride1%8 != 0 {
    		return fmt.Errorf("bad stride %d", stride1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 25 00:46:29 UTC 2024
    - 24.4K bytes
    - Viewed (0)
Back to top