Table of Contents
ls027b7dh01_save_"display
Saves the contents of the Sharp LS027B7DH01 LCD display to a file.
Description
The ls027b7dh01_save_"display function saves the contents of the Sharp LS027B7DH01 LCD display to a PBM file.
The PBM format is a lossless but compact format intended for black and white images that is
recognized by many image viewers. The filename should have a .pbm
extension.
Prototype
t_error ls027b7dh01_save_display(t_ls027b7dh01 display, const char* filename);
Parameters
t_ls027b7dh01 display
A handle to the display returned by the ls027b7dh01_open function.
const char * filename
The name of the file in which to save the image. The filename should have a .pbm
extension.
Return value
The return value is zero if the operation is successful. Otherwise a negative
error code is returned. Error codes are
defined in quanser_errors.h
. A suitable error message
may be retrieved using msg_get_error_message.
Error codes
QERR_INVALID_ARGUMENT
One of the arguments is invalid.
Requirements
Include Files |
Libraries |
---|---|
quanser_lcd_display.h |
quanser_devices.lib;quanser_communications.lib;quanser_runtime.lib;quanser_common.lib |
Examples
t_ls027b7dh01 display; t_error result = ls027b7dh01_open("spi-cpu://localhost:1?word='8',baud='45000000',polarity='on',phase='on',memsize='8192',frame='0'", LCD_ACCESS_EXCLUSIVE, &display); if (result == 0) { ls027b7dh01_draw_image(display, 0, 0, 400, 240, bw_image); ... ls027b7dh01_save_display(display, "snapshot.pbm"); ls027b7dh01_close(display); } else { TCHAR message[512]; msg_get_error_message(NULL, result, message, sizeof(message)); _tprintf(_T("Failed to open LCD display. %s (error %d)\n"), message, -result); }
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.