image

<script src="./point_src/image"></script>

Meta Data
filepath_exists True
path image
filepath image.js
clean_files ()

  • VariableDeclaration
    const

    image

    =
    function ( ctx , src )
  • ClassDeclaration
    class comments:
    Load an _image_ (such as png) into the point position with a given path: point = new Point(200,200) image = new ImageLoader("./images/mail.png", point) image.position.rotation = 30 image.draw(ctx) The draw factors in the point radius, position, and rotation
    • constructor

      constructor

      (
      path , point
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Load an _image_ (such as png) into the point position with a given path: point = new Point(200,200) image = new ImageLoader("./images/mail.png", point) image.position.rotation = 30 image.draw(ctx) The draw factors in the point radius, position, and rotation
    • method

      load

      (
      path
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      img.crossOrigin = 'anonymous';
    • method

      setImageData

      (
      data
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      stage.offScreenCanvas.transferToImageBitmap()
    • method

      getOffscreenCanvas

      (
      width = 200 , height = 300
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getImageData

      (
      osc , width = 200 , height = 300
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      draw

      (
      ctx
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      First we move to the location of which to spin.
    • method

      recolor

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      we manipulate the pixel data here in order to make the image lighter
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • VariableDeclaration
    var

    oSepia

    =
    function ( ctx , img , canvas )
  • VariableDeclaration
    const

    asImageData

    =
    function ( img , ctx )
    createImageBitmap(asImageData(stage.image.image, stage.ctx)).then(b=>{ stage.image.imageData = b; })
  • VariableDeclaration
    const

    putImageData

    =
    function ( ctx , imageData )
  • VariableDeclaration
    const

    imageDataEditor

    =
    function ( ctx , img , func )
  • VariableDeclaration
    var

    sepia

    =
    function ( data )
  • VariableDeclaration
    var

    invert

    =
    function ( data )
    red
  • VariableDeclaration
    var

    blur

    =
    function ( data , width , height )
    Copy of original data so we don’t overwrite as we go
  • VariableDeclaration
    var

    blur2

    =
    function ( data , width , height , amount =1 )
    ensures odd size: 3, 5, 7...
  • VariableDeclaration
    var

    blur3

    =
    function ( data , width , height , amount =1 )
    odd grid: 3, 5, 7...
  • FunctionDeclaration
    function

    blurSeparable

    (
    data , width , height , amount = 1
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    gaussianBlur

    (
    imageData , amount = 1
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    generateGaussianKernel

    (
    size , sigma
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    convolve

    (
    data , width , height , kernel , kernelSize
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    gaussianWeights

    (
    size , sigma
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    blurSeparableGaussian

    (
    data , width , height , amount = 1
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    invertColors

    (
    data
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • VariableDeclaration
    var

    grayscale

    =
    function ( data )
    red
  • ClassDeclaration
    class comments:
    Rescaling needs a base value (init radius) to scale from.
    • constructor

      constructor

      (
      pathData , point
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      draw

      (
      ctx
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Rescaling needs a base value (init radius) to scale from.
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])