# moderngl_window.screenshot

moderngl_window.screenshot.create(source: Framebuffer | Texture, file_format='png', name: str = None, mode='RGB', alignment=1)

  Create a screenshot from a `moderngl.Framebuffer` or `moderngl.Texture`. The screenshot will be written to `SCREENSHOT_PATH` if set or `cwd` or an absolute path can be used.

  Parameters:

    - source – The framebuffer or texture to screenshot

    - file_format (str) – formats supported by PIL (png, jpeg etc)

    - name (str) – Optional file name with relative or absolute path

    - mode (str) – Components/mode to use

    - alignment (int) – Buffer alignment