Fixed the grabber to produce a limited number of flag based png-files with unique names,

Former-commit-id: dd37349042efa4642761b63d9e57ae39986a8386
This commit is contained in:
T. van der Zwan 2013-12-05 12:57:32 +00:00
parent 22c2a823a5
commit f1e28b3850
2 changed files with 3 additions and 2 deletions

Binary file not shown.

View File

@ -111,7 +111,7 @@ int main(int argc, char** argv)
QImage qImage(64, 64, QImage::Format_ARGB32); QImage qImage(64, 64, QImage::Format_ARGB32);
Image<ColorRgba> imageRgba(64, 64); Image<ColorRgba> imageRgba(64, 64);
for (int i=0; i<grabCount || grabCount < 0; ++i) { for (int i=0; i<grabCount || grabCount < 0; ++i)
{ {
frameGrabber.grabFrame(imageRgba); frameGrabber.grabFrame(imageRgba);
@ -122,7 +122,7 @@ int main(int argc, char** argv)
} }
const QImage qImageSwp = qImage.rgbSwapped(); const QImage qImageSwp = qImage.rgbSwapped();
qImageSwp.save(QString("HYPERION_f0x%1_%2.png").arg(grabFlags, 2, 16).arg(iFrame)); qImageSwp.save(QString("HYPERION_f0x%1_%2.png").arg(grabFlags, 8, 16, QChar('0')).arg(iFrame));
++iFrame; ++iFrame;
timespec sleepTime; timespec sleepTime;
@ -133,3 +133,4 @@ int main(int argc, char** argv)
return 0; return 0;
} }