Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Maybe you could just use expoblur over the QImage and re-encode the blurred video.</p> <p><a href="http://www.qtcentre.org/archive/index.php/t-26534.html" rel="nofollow">http://www.qtcentre.org/archive/index.php/t-26534.html</a></p> <pre><code>static QImage blurred(const QImage&amp; image, const QRect&amp; rect, int radius, bool alphaOnly = false) { int tab[] = { 14, 10, 8, 6, 5, 5, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2 }; int alpha = (radius &lt; 1) ? 16 : (radius &gt; 17) ? 1 : tab[radius-1]; QImage result = image.convertToFormat(QImage::Format_ARGB32_Premultiplied); int r1 = rect.top(); int r2 = rect.bottom(); int c1 = rect.left(); int c2 = rect.right(); int bpl = result.bytesPerLine(); int rgba[4]; unsigned char* p; int i1 = 0; int i2 = 3; if (alphaOnly) i1 = i2 = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3); for (int col = c1; col &lt;= c2; col++) { p = result.scanLine(r1) + col * 4; for (int i = i1; i &lt;= i2; i++) rgba[i] = p[i] &lt;&lt; 4; p += bpl; for (int j = r1; j &lt; r2; j++, p += bpl) for (int i = i1; i &lt;= i2; i++) p[i] = (rgba[i] += ((p[i] &lt;&lt; 4) - rgba[i]) * alpha / 16) &gt;&gt; 4; } for (int row = r1; row &lt;= r2; row++) { p = result.scanLine(row) + c1 * 4; for (int i = i1; i &lt;= i2; i++) rgba[i] = p[i] &lt;&lt; 4; p += 4; for (int j = c1; j &lt; c2; j++, p += 4) for (int i = i1; i &lt;= i2; i++) p[i] = (rgba[i] += ((p[i] &lt;&lt; 4) - rgba[i]) * alpha / 16) &gt;&gt; 4; } for (int col = c1; col &lt;= c2; col++) { p = result.scanLine(r2) + col * 4; for (int i = i1; i &lt;= i2; i++) rgba[i] = p[i] &lt;&lt; 4; p -= bpl; for (int j = r1; j &lt; r2; j++, p -= bpl) for (int i = i1; i &lt;= i2; i++) p[i] = (rgba[i] += ((p[i] &lt;&lt; 4) - rgba[i]) * alpha / 16) &gt;&gt; 4; } for (int row = r1; row &lt;= r2; row++) { p = result.scanLine(row) + c2 * 4; for (int i = i1; i &lt;= i2; i++) rgba[i] = p[i] &lt;&lt; 4; p -= 4; for (int j = c1; j &lt; c2; j++, p -= 4) for (int i = i1; i &lt;= i2; i++) p[i] = (rgba[i] += ((p[i] &lt;&lt; 4) - rgba[i]) * alpha / 16) &gt;&gt; 4; } return result; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload