20 char *header_buf = (
char*)(&hdr);
21 size_t header_len =
sizeof(hdr);
22 const char *img_buf =
nullptr;
25 for (
size_t i=0; i<writer.
length(); i++) {
26 const char *data = writer.
data(i);
27 size_t len = writer.
length(i);
33 memcpy(header_buf,data,len);
37 if (header_len == 0) {
39 img_len = writer.
length(i)-len;
52 img.setPixelCode(hdr.
id);
54 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.