Skip to content

Capture starts with wrong dimensions + get() on demand pauses it #4535

@ffd8

Description

@ffd8

Most appropriate sub-area of p5.js?

  • Color
  • Core/Environment/Rendering
  • Data
  • Dom
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

Details about the bug:

  • p5.js version: 1.0.0
  • Web browser and version: Chrome 81.0.4044.129
  • Operating System: MacOS 10.13.6
  • Steps to reproduce this:

Two issues found, with example sketch here:

1st – when loading a createCapture and using imageMode(CENTER), the image is displayed from the x, y point upwards to the left.... sort of the opposite of CORNER. Must have to do with it not knowing the actual image dimensions and never getting an update once known?

2nd – if using get() on the capture outside of the draw, it freezes/pauses the capture. Seems this was an issue in the past within the draw from issue #3753 – no longer a problem in the draw and doing so, solves the whole problem.. just an issue if only called within something like mousePressed() – which is useful if only wanting to take a snapshot of the capture on demand.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions