[FFmpeg-trac] #6911(avfilter:new): Drawbox & drawgrid replace source pixels if input or box color has alpha

FFmpeg trac at avcodec.org
Tue Dec 12 15:04:37 EET 2017


#6911: Drawbox & drawgrid replace source pixels if input or box color has alpha
----------------------------------+--------------------------------------
             Reporter:  Gyan      |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avfilter  |                  Version:  git-master
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 If the video input has an alpha component or the user specifies
 transparency in the box/grid-color, the drawbox and drawgrid filters
 replace the source pixels when painting the box or grid. This is almost
 always undesired. The alpha component of the user color is meant for
 blending the box/grid on top of the input. The input alpha should be left
 intact. Essentially, the filters draw a "hole" if alpha is involved. See
 attached `result-drawbox-src-with-no-alpha-existing.jpg`

 Inputs and outputs for

 `ffmpeg -i view.jpg -i window.png -lavfi
 "[1]drawbox=200:0:400:56:c=black at 0.5:t=fill[win];[0][win]overlay" result-
 drawbox-src-with-alpha-existing.jpg`

 are attached, along with expected result.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6911>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list