17 char *header_buf = (
char*)(&hdr);
18 size_t header_len =
sizeof(hdr);
19 const char *img_buf =
nullptr;
22 for (
size_t i=0; i<writer.
length(); i++) {
23 const char *data = writer.
data(i);
24 size_t len = writer.
length(i);
30 memcpy(header_buf,data,len);
34 if (header_len == 0) {
36 img_len = writer.
length(i)-len;
49 img.setPixelCode(hdr.
id);
51 img.setExternal((
char*)img_buf,w,h);
Minimal requirements for an efficient Writer.
virtual size_t length() const =0
virtual const char * data(size_t index) const =0
Image class with user control of representation details.
An interface to the operating system, including Port based communication.