Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for bytesPerPixel (0.11 sec)

  1. src/image/png/reader.go

    			// check above that width != 0, and so len(cdat) != 0.
    			for i := 0; i < bytesPerPixel; i++ {
    				cdat[i] += pdat[i] / 2
    			}
    			for i := bytesPerPixel; i < len(cdat); i++ {
    				cdat[i] += uint8((int(cdat[i-bytesPerPixel]) + int(pdat[i])) / 2)
    			}
    		case ftPaeth:
    			filterPaeth(cdat, pdat, bytesPerPixel)
    		default:
    			return nil, FormatError("bad filter type")
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 26K bytes
    - Viewed (0)
  2. src/image/image.go

    //
    // This panics instead of returning an error because of backwards
    // compatibility. The NewXxx functions do not return an error.
    func pixelBufferLength(bytesPerPixel int, r Rectangle, imageTypeName string) int {
    	totalLength := mul3NonNeg(bytesPerPixel, r.Dx(), r.Dy())
    	if totalLength < 0 {
    		panic("image: New" + imageTypeName + " Rectangle has huge or negative dimensions")
    	}
    	return totalLength
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 34.9K bytes
    - Viewed (0)
Back to top