-/*
-//static
-QPixmap Render::getVideoThumbnail(char *profile, QString file, int frame_position, int width, int height) {
- QPixmap pix(width, height);
- char *tmp = decodedString(file);
- Mlt::Profile *prof = new Mlt::Profile(profile);
- Mlt::Producer m_producer(*prof, tmp);
- delete[] tmp;
- if (m_producer.is_blank()) {
- pix.fill(Qt::black);
- return pix;
- }
-
- Mlt::Filter m_convert(*prof, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
- m_producer.attach(m_convert);
- m_producer.seek(frame_position);
- Mlt::Frame * frame = m_producer.get_frame();
- if (frame) {
- pix = frameThumbnail(frame, width, height, true);
- delete frame;
- }
- if (prof) delete prof;
- return pix;
-}
-*/
-/*
-void Render::getImage(KUrl url, int frame_position, QPoint size)
-{
- char *tmp = decodedString(url.path());
- Mlt::Producer m_producer(tmp);
- delete[] tmp;
- if (m_producer.is_blank()) {
- return;
- }
- Mlt::Filter m_convert("avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
- m_producer.attach(m_convert);
- m_producer.seek(frame_position);
-
- Mlt::Frame * frame = m_producer.get_frame();
-
- if (frame) {
- QPixmap pix = frameThumbnail(frame, size.x(), size.y(), true);
- delete frame;
- emit replyGetImage(url, frame_position, pix, size.x(), size.y());
- }
-}*/
-
-/* Create thumbnail for color */
-/*void Render::getImage(int id, QString color, QPoint size)
-{
- QPixmap pixmap(size.x() - 2, size.y() - 2);
- color = color.replace(0, 2, "#");
- color = color.left(7);
- pixmap.fill(QColor(color));
- QPixmap result(size.x(), size.y());
- result.fill(Qt::black);
- //copyBlt(&result, 1, 1, &pixmap, 0, 0, size.x() - 2, size.y() - 2);
- emit replyGetImage(id, result, size.x(), size.y());
-
-}*/
-
-/* Create thumbnail for image */
-/*void Render::getImage(KUrl url, QPoint size)
-{
- QImage im;
- QPixmap pixmap;
- if (url.fileName().startsWith(".all.")) { // check for slideshow
- QString fileType = url.fileName().right(3);
- QStringList more;
- QStringList::Iterator it;
-
- QDir dir( url.directory() );
- more = dir.entryList( QDir::Files );
- for ( it = more.begin() ; it != more.end() ; ++it ) {
- if ((*it).endsWith("."+fileType, Qt::CaseInsensitive)) {
- if (!im.load(url.directory() + '/' + *it))
- kDebug()<<"++ ERROR LOADIN IMAGE: "<<url.directory() + '/' + *it;
- break;
- }
- }
- }
- else im.load(url.path());
-
- //pixmap = im.smoothScale(size.x() - 2, size.y() - 2);
- QPixmap result(size.x(), size.y());
- result.fill(Qt::black);
- //copyBlt(&result, 1, 1, &pixmap, 0, 0, size.x() - 2, size.y() - 2);
- emit replyGetImage(url, 1, result, size.x(), size.y());
-}*/
-