Commit b86da848 authored by Vincent Carrubba's avatar Vincent Carrubba
Browse files

Gore transformation of the GreenEffectFilter into LogoIncrustation, but it...

Gore transformation of the GreenEffectFilter into LogoIncrustation, but it works, juste put a file called vlmc.png in the root directory of vlmc, kiss, have a good night
parent e05498f2
......@@ -30,7 +30,8 @@ GreenFilterEffect::GreenFilterEffect() : GenericEffect(
GreenFilterEffect::m_videoInputsNames, GreenFilterEffect::m_nbVideoInputs,
GreenFilterEffect::m_videoOutputsNames, GreenFilterEffect::m_nbVideoOutputs
),
m_enabled( true )
m_logo(QImage(QImage("vlmc.png").scaled(100, 100, Qt::KeepAspectRatio)).rgbSwapped()),
m_enabled( true )
{
};
......@@ -47,11 +48,18 @@ void GreenFilterEffect::render( void )
if (tmp->frame.octets != NULL)
{
if (m_enabled)
for ( i = 0; i < tmp->nbpixels; ++i )
{
tmp->frame.pixels[i].Red = 0;
tmp->frame.pixels[i].Blue = 0;
}
{
QImage img(tmp->frame.octets, 640, 480, QImage::Format_RGB888);
QPainter pouet(&img);
pouet.drawImage(530, 380, m_logo);
// pouet.fillRect(30, 30, 100, 100, Qt::blue);
}
// for ( i = 0; i < tmp->nbpixels; ++i )
// {
// tmp->frame.pixels[i].Red = 0;
// tmp->frame.pixels[i].Blue = 0;
// }
}
(m_videoOutputs[0]) << tmp;
return ;
......
......@@ -24,6 +24,8 @@
#define GREENFILTEREFFECT_H_
#include "GenericEffect.h"
#include <QPainter>
#include <QImage>
class GreenFilterEffect : public GenericEffect
{
......@@ -42,6 +44,7 @@ class GreenFilterEffect : public GenericEffect
private:
QImage m_logo;
bool m_enabled;
static quint32 const m_nbVideoInputs = 1;
static quint32 const m_nbVideoOutputs = 1;
......
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