void KThumb::extractImage(QList <int>frames)
{
if (!KdenliveSettings::videothumbnails() || m_producer == NULL) return;
- m_clipManager->requestThumbs(m_id, frames);
+ m_clipManager->slotRequestThumbs(m_id, frames);
}
void KThumb::getThumb(int frame)
{
- const int theight = KdenliveSettings::trackheight();
+ const int theight = Kdenlive::DefaultThumbHeight;
const int swidth = (int)(theight * m_ratio + 0.5);
const int dwidth = (int)(theight * m_dar + 0.5);
QImage img = getProducerFrame(frame, swidth, dwidth, theight);
{
if (m_producer == NULL) {
QImage img(width, height, QImage::Format_ARGB32_Premultiplied);
- img.fill(Qt::black);
+ img.fill(QColor(Qt::black).rgb());
return img;
}
return getProducerFrame(frame, (int) (height * m_ratio + 0.5), width, height);
QMutexLocker lock(&m_mutex);
m_producer->seek(framepos);
Mlt::Frame *frame = m_producer->get_frame();
- frame->set("rescale.interp", "nearest");
+ /*frame->set("rescale.interp", "nearest");
frame->set("deinterlace_method", "onefield");
- frame->set("top_field_first", -1 );
+ frame->set("top_field_first", -1 );*/
QImage p = getFrame(frame, frameWidth, displayWidth, height);
delete frame;
return p;
} else {
image = image.scaled(displayWidth, height, Qt::IgnoreAspectRatio).rgbSwapped();
}
- p.fill(QColor(Qt::black).rgb());
+#if QT_VERSION >= 0x040800
+ p.fill(QColor(100, 100, 100, 70));
QPainter painter(&p);
+#else
+ p.fill(Qt::transparent);
+ QPainter painter(&p);
+ painter.fillRect(p.rect(), QColor(100, 100, 100, 70));
+#endif
painter.drawImage(p.rect(), image);
painter.end();
} else
if (url.isEmpty()) return;
QPixmap image(width, height);
Mlt::Producer m_producer(url.path().toUtf8().constData());
- image.fill(Qt::black);
+ image.fill(QColor(Qt::black).rgb());
if (m_producer.is_blank()) {
emit thumbReady(startframe, image);