Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for tRNS (0.25 sec)

  1. src/image/png/reader_test.go

    			b = append(b, trns...)
    		}
    		b = append(b, idat...)
    		b = append(b, iend...)
    
    		var want color.Color
    		m, err := Decode(bytes.NewReader(b))
    		switch i {
    		case 0:
    			if err != nil {
    				t.Errorf("%d tRNS chunks: %v", i, err)
    				continue
    			}
    			want = color.RGBA{0xff, 0x00, 0x00, 0xff}
    		case 1:
    			if err != nil {
    				t.Errorf("%d tRNS chunks: %v", i, err)
    				continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 24 12:12:12 UTC 2022
    - 28.5K bytes
    - Viewed (0)
  2. src/image/png/reader.go

    	case cbTC8, cbTC16:
    		if length != 6 {
    			return FormatError("bad tRNS length")
    		}
    		n, err := io.ReadFull(d.r, d.tmp[:length])
    		if err != nil {
    			return err
    		}
    		d.crc.Write(d.tmp[:n])
    
    		copy(d.transparent[:], d.tmp[:length])
    		d.useTransparent = true
    
    	case cbP1, cbP2, cbP4, cbP8:
    		if length > 256 {
    			return FormatError("bad tRNS length")
    		}
    		n, err := io.ReadFull(d.r, d.tmp[:length])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 26K bytes
    - Viewed (0)
  3. src/image/png/writer.go

    		e.tmp[3*i+2] = c1.B
    		if c1.A != 0xff {
    			last = i
    		}
    		e.tmp[3*256+i] = c1.A
    	}
    	e.writeChunk(e.tmp[:3*len(p)], "PLTE")
    	if last != -1 {
    		e.writeChunk(e.tmp[3*256:3*256+1+last], "tRNS")
    	}
    }
    
    // An encoder is an io.Writer that satisfies writes by writing PNG IDAT chunks,
    // including an 8-byte header and 4-byte CRC checksum per Write call. Such calls
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 15.4K bytes
    - Viewed (0)
Back to top