qjpeg/testFP.cpp
author viric@llimona
Mon, 22 Jan 2007 00:45:57 +0100
changeset 76 9cbf4c7e7986
permissions -rw-r--r--
First classes for the qjpeg project.

#include "FloatPlane.h"

int main()
{
    FloatPlane a;

    a.allocate(100,100);

    float *p = a.getPtr();
    unsigned int w = a.getWidth();

    for(int j=0; j < 100; j++)
        for(int i=0; i < 100; i++)
            p[j*w + i] = (float) ((i+j) % 255);

    a.writePGM("prova.pgm");

    a.free();
}