qjpeg/testFP.cpp
changeset 76 9cbf4c7e7986
equal deleted inserted replaced
75:327eef3fe747 76:9cbf4c7e7986
       
     1 #include "FloatPlane.h"
       
     2 
       
     3 int main()
       
     4 {
       
     5     FloatPlane a;
       
     6 
       
     7     a.allocate(100,100);
       
     8 
       
     9     float *p = a.getPtr();
       
    10     unsigned int w = a.getWidth();
       
    11 
       
    12     for(int j=0; j < 100; j++)
       
    13         for(int i=0; i < 100; i++)
       
    14             p[j*w + i] = (float) ((i+j) % 255);
       
    15 
       
    16     a.writePGM("prova.pgm");
       
    17 
       
    18     a.free();
       
    19 }