Hi,
Yeah i observed it is pretty silly. I have rectified all the mistakes.
QPixmap p(scn3->width(),scn3->height());
QPainter paint(&p);
scn3->render(&paint);
QImage img=p.toImage();
int width=img.width();
int height=img.height();
QFile file("/Users/venkateshpadmanabhan/Desktop/out1.txt");
file.open(QIODevice::WriteOnly);
QTextStream tex(&file);
for(int j=0;j<height;j++)
{
for (int i=0;i<width;i++)
{
int s=img.pixel(i,j);
//matrix[width][height]=qGray(img.pixel(i,j));
tex<<mat;
endl(tex);
//
}
}
file.close();
I could get the output, which is the color of the pixel value. But what i wanted is, the transformation matrix of the Pixmap. I couldnt trace a way to save the Transformation Matrix of the in QTextStream. Your guidance would be really helpful...
Bookmarks