     @_inlineable
     public func pixel(_ point: Point) -> ColorPixel<Pixel.Model> {
         
-        switch self.resamplingAlgorithm {
+        switch resamplingAlgorithm {
         case .none: return read_source(Int(point.x), Int(point.y))
         case .linear: return sampling2(point: point, sampler: LinearInterpolate)
         case .cosine: return sampling2(point: point, sampler: CosineInterpolate)

    @inline(__always)
    func read_source(_ x: Int, _ y: Int) -> ColorPixel<Pixel.Model> {
        
        let x_range = 0..<width
        let y_range = 0..<height
        
        if x_range ~= x && y_range ~= y {
            return ColorPixel(pixels[y * width + x])
        }
        
        let _x = x.clamped(to: x_range)
        let _y = y.clamped(to: y_range)
        
        return ColorPixel(color: pixels[_y * width + _x].color, opacity: 0)
    }
    
    @_versioned

    
    public var resamplingAlgorithm: ResamplingAlgorithm
    
    public var wrappingMode: WrappingMode
    
    @_inlineable
    public init(image: Image<Pixel>, resamplingAlgorithm: ResamplingAlgorithm = .default, wrappingMode: WrappingMode = .default) {
        self.width = image.width
        self.height = image.height
        self.pixels = image.pixels
        self.resamplingAlgorithm = resamplingAlgorithm
        self.wrappingMode = wrappingMode
    }
}

