Commit 8e45fe85 authored by Basil Huber's avatar Basil Huber

Repaired feature to save images from video downlink (fixes #1239)

problem:
in src/ui$/HUD.cc copyImage(UASInterface* u): u->getImage() was called twice. The first called already erased the buffer.

changes:
src/ui/HUD.cc: copyImage(UASInterface* u): instead of getting the image a second time, we take the one we already fetched
parent 24bf2218
......@@ -1363,14 +1363,14 @@ void HUD::copyImage(UASInterface* uas)
QImage temp_im = u->getImage();
if (temp_im.byteCount() > 0) {
this->glImage = temp_im;
}
// Save to directory if logging is enabled
if (imageLoggingEnabled)
{
u->getImage().save(QString("%1/%2.png").arg(imageLogDirectory).arg(imageLogCounter));
imageLogCounter++;
}
// Save to directory if logging is enabled
if (imageLoggingEnabled)
{
temp_im.save(QString("%1/%2.png").arg(imageLogDirectory).arg(imageLogCounter));
imageLogCounter++;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment