Get Prepared Image

GET /prepared-image

Get the last prepared image. This is the image that is shown in NINA in the image dockable.

Query parameters

  • resize boolean

    Whether to resize the image.

  • quality integer(int32)

    The quality of the image, ranging from 1 (worst) to 100 (best). -1 or omitted for png

  • size string

    The size of the image ([width]x[height]). Requires resize to be true.

  • scale number(double)

    The scale of the image. Requires resize to be true.

  • factor number(double)

    The stretch factor to apply, between 0 and 1. Defaults to what is configured in the profile.

  • blackClipping number(double)

    The black clipping to apply. Defaults to what is configured in the profile.

  • unlinked boolean

    Indicates if the stretch should be unlinked. Defaults to what is configured in the profile.

  • debayer boolean

    Indicates if the image should be debayered

  • bayerPattern string

    What bayer pattern to use for debayering, if debayer is true. If this is not specified, the api will try to use the bayer pattern that is configured in the profile as its first option, if that is set to Auto, the api will try to use the bayer pattern reported by the camera if it is connected. The fallback value is Monochrome.

    Values are Monochrome, Color, RGGB, CMYG, CMYG2, LRGB, BGGR, GBRG, GRBG, GRGB, GBGR, RGBG, or BGRG.

  • autoPrepare boolean

    Setting this to true will leave all processing up to NINA and you will recieve exactly the same image as you see in NINA. All other parameters related to image processing will have no effect.

Responses

  • Successful response

    Image in png format, when stream is set to true and the image quality is not specified or set to -1

    Image in jpg format, when stream is set to true and the image quality is specified

  • 400 application/json

    Invalid image index / invalid bayer pattern / image is not a FITS file

    Hide response attributes Show response attributes object
    • Response string
    • Error string
    • StatusCode integer
    • Success boolean
    • Type string
  • 500 application/json

    Internal server error, Unknown error

    Hide response attributes Show response attributes object
    • Response string
    • Error string
    • StatusCode integer
    • Success boolean
    • Type string
GET /prepared-image
curl \
 --request GET 'http://localhost:1888/v2/api/prepared-image'
Response examples (400)
{
  "Response": "string",
  "Error": "Invalid bayer pattern",
  "StatusCode": 400,
  "Success": false,
  "Type": "API"
}
Response examples (500)
{
  "Response": "string",
  "Error": "Unknown error",
  "StatusCode": 500,
  "Success": false,
  "Type": "API"
}