rok4

C++ code posted by NV
created at 23 Sep 18:25

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
template<typename pixel_t>
size_t BilEncoder<pixel_t>::getdata(uint8_t *buffer, size_t size) {
  size_t offset = 0;

  LOGGER_DEBUG( "Encodage BIL : height " <<image->height<< " image->linesize" <<image->linesize);

  for(; line < image->height && offset + image->linesize <= size; line++) {
    image->getline((typename pixel_t::data_t*)(buffer + offset), line);
    offset += image->linesize*sizeof(typename pixel_t::data_t);
  }

  return offset;
}
456 Bytes in 3 ms with coderay