MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / readRaw8bit

Method readRaw8bit

IPL/src/IPLFileIO.cpp:307–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307bool IPLFileIO::readRaw8bit(int stride, IPLImage *&image, std::ifstream &file)
308{
309 char buffer;
310 int x=0;
311 int y=0;
312 while(file.good())
313 {
314 file.read(&buffer, 1);
315
316 ipl_basetype value = ((uchar) buffer) * FACTOR_TO_FLOAT;
317 image->plane(0)->cp(x, y) = value;
318
319 x++;
320 if(x % stride == 0)
321 {
322 x = 0;
323 y++;
324 }
325 }
326 return true;
327}
328
329bool IPLFileIO::readRaw24BitInterleaved(int stride, IPLRawImageType format, IPLImage *&image, std::ifstream &file)
330{

Callers

nothing calls this directly

Calls 1

planeMethod · 0.80

Tested by

no test coverage detected