5.9.2 api display image
2N® IP Style
The /api/display/image function helps you modify the content to be displayed: upload a GIF / JPEG image to or delete an earlier uploaded image from the display. Progressive JPEG images are not supported.
The function is part of the Display service and the user must be assigned the Display Control privilege for authentication if required.
The PUT or DELETE method can be used for this function: PUT helps upload an image to the display, DELETE helps delete an uploaded image from the display.
PUT method
Request parameters:
Parameter | Description |
---|---|
blob-image | Mandatory parameter containing a JPEG / BMP / PNG image with 1280 x 800 display resolution (refer to /api/display/caps). The parameter is applied only if the PUT method is used. Progressive JPEG images are not supported. |
duration | Optional parameter. Image display time. The parameter is set in milliseconds. |
There are two ways how to display an image: as a notification or as an overlay. Notifications are displayed for a predefined period of time and automatically disappear after the timeout. Overlays keep displayed until replaced with another image or removed by the user.
If the HTTP request does not include an optional parameter, the image is displayed in the overlay mode, i.e. uploaded for an indefinite period of time. If an optional parameter is included, the image is displayed in the notification mode, which ends when a preset timeout expires. Touch the display to end the notification earlier.
When uploaded for the first time, the image is transferred from the main unit to the display via an internal bus (which may take some time). Several images may be stored in the display memory and if the same images are sent to the device in the future, they are no longer transferred via the internal bus. They are immediately displayed from the memory instead.
The reply is in the application/json format and includes no parameters.
Image parameters:
Model | Image size | Supported formats |
---|---|---|
2N® IP Style | 1280 x 800 pixels | Normal JPEG (recommended), PNG |
Note
- The supported JPEG format is JPEG Baseline (non-progressive encoding).
Example:
PUT api/display/image&duration=30000 { "success" : true }
DELETE method
Parameter | Description |
---|---|
display | Mandatory display identifier. Find the value in Hardware/Extending modules/Module name or using /api/display/caps. |
Example:
DELETE api/display/image { "success" : true }
2N® IP Verso
The /api/display/image function helps you modify the content to be displayed: upload a GIF / JPEG / BMP image to or delete an earlier uploaded image from the display. Progressive JPEG images are not supported.
The function is part of the Display service and the user must be assigned the Display Control privilege for authentication if required.
The PUT or DELETE method can be used for this function: PUT helps upload an image to the display, DELETE helps delete an uploaded image from the display.
PUT method
Request parameters:
Parameter | Description |
---|---|
display | Mandatory display identifier. Find the value in Hardware/Extending modules/Module name or using /api/display/caps. |
blob-image | Mandatory parameter containing a JPEG / BMP / PNG image with 320 x 214 display resolution (refer to /api/display/caps). The parameter is applied only if the PUT method is used. The request may contain just one parameter: blob-image or blob-video. Progressive JPEG images are not supported. |
blob-video | Mandatory parameter containing an MPEG4 / H264 video of the maximum duration of 60 s, maximum of 15 fps and resolution of 320 x 214 pixels. The request may contain just one parameter: blob-image or blob-video. |
duration | Optional parameter. Image display / video playing time. The parameter is set in milliseconds. |
repeat | Optional parameter. Video playing repetition count. The parameter applies to video only. |
There are two ways how to display an image: as a notification or overlay. Notifications are displayed for a predefined period of time and automatically disappear after the timeout. Overlays keep displayed until replaced with another image or removed by the user.
If the HTTP request does not include any of the above mentioned optional parameters, the overlay mode is used, i.e. the image is displayed for an indefinite period of time. If both the optional parameters are included, the notification is terminated by the event that is generated earlier. Touch the display to end the notification earlier.
When uploaded for the first time, the image is transferred from the main unit to the display via an internal bus (which may take some time). Several images may be stored in the display memory and if the same images are sent to the device in the future, they are no longer transferred via the internal bus. They are immediately displayed from the memory instead.
The reply is in the application/json format and includes no parameters.
Image parameters:
Model | Image size | Supported formats |
---|---|---|
2N® IP Verso | 320 x 214 pixels | Normal JPEG (recommended), BMP, PNG |
Note
- The supported JPEG format is JPEG Baseline (non-progressive encoding).
Example:
api/display/image?display=ext1&duration=30000 { "success" : true }
Video parameters:
Model | Video size | Supported formats |
---|---|---|
2N® IP Verso | 214 x 240 pixels | MPEG4 / H264: Baseline profile, up to 5.2 level |
Example:
api/display/image?display=ext1&repeat=5 { "success" : true }
DELETE method
Parameter | Description |
---|---|
display | Mandatory display identifier. Find the value in Hardware/Extending modules/Module name or using /api/display/caps. |
Example:
DELETE /api/display/image?display=ext1 { "success" : true }
2N® IP Vario
The /api/display/image function helps you modify the content to be displayed: upload a GIF / JPEG / BMP image to or delete an earlier uploaded image from the display.
The function is part of the Display service and the user must be assigned the Display Control privilege for authentication if required.
The PUT or DELETE method can be used for this function: PUT helps upload an image to the display, DELETE helps delete an uploaded image from the display.
Request parameters:
Parameter | Description |
---|---|
display | Mandatory display identifier (internal). |
blob-image | Mandatory parameter including an image in the supported format with display resolution (see /api/display/caps). The parameter is applied only if the PUT method is used. |
The reply is in the application/json format and includes no parameters.
Image parameters:
Model | Image size | Supported formats |
---|---|---|
2N® IP Vario | 320 x 240 pixels | JPEG (recommended), GIF, BMP |
Caution
The supported JPEG format is JPEG Baseline (non-progressive encoding).
Example:
DELETE /api/display/image?display=internal { "success" : true }