Remove extra pixel consistently

This commit is contained in:
LordGrey
2023-12-30 16:22:59 +01:00
parent 89ec43b851
commit ccacad9b3f
6 changed files with 31 additions and 46 deletions

View File

@@ -178,7 +178,7 @@ void AudioGrabber::processAudioFrame(int16_t* buffer, int length)
}
// Convert to Image<ColorRGB>
Image<ColorRgb> finalImage (static_cast<unsigned>(image.width()), static_cast<unsigned>(image.height()));
Image<ColorRgb> finalImage (image.width(),image.height());
for (int y = 0; y < image.height(); y++)
{
memcpy((unsigned char*)finalImage.memptr() + y * image.width() * 3, static_cast<unsigned char*>(image.scanLine(y)), image.width() * 3);

View File

@@ -318,7 +318,7 @@ void EncoderThread::processImageMjpeg()
}
}
Image<ColorRgb> srcImage(static_cast<unsigned>(_width), static_cast<unsigned>(_height));
Image<ColorRgb> srcImage(_width, _height);
if (tjDecompress2(_tjInstance, _localData , _size,
reinterpret_cast<unsigned char*>(srcImage.memptr()), _width, 0, _height,

View File

@@ -27,7 +27,6 @@ X11Grabber::X11Grabber(int cropLeft, int cropRight, int cropTop, int cropBottom)
, _XRandRAvailable(false)
, _isWayland (false)
, _logger{}
, _image(0,0)
{
_logger = Logger::getInstance("X11");