Trent Piepho wrote:
Just make the entire filter depend on configure finding libpng, which it already looks for. Once you support png, there really isn't any point to supporting another format. The advantage of png is that you can use a compressed bitmap instead of an uncompressed greyscale image, and you could use png images as well for the alpha-blending filter. In fact, you could use the SAME png images for both filters.
Indeed. vf_deblendlogo (currently also under discussion on the list) already ignores completely opaque pixels with the intention that they'd be handled by a blurring delogo filter instead. If this new filter looked for completely opaque pixels in the template and did the blur there exactly the same template could be used for both. There's already PNG-loading code that will require little modification in the deblendlogo filter. However, that entire filter is disabled if libpng isn't linked, which might be seen as a major drawback by some. A simple, generic image loading API for mplayer which supports all available image loaders would help fix this, but would be extra bloat in itself I suppose. In fact, if both filters are going to share the same template loading code and operate on the same template, it could be argued that they'd be better merged into one all-encompassing delogo filter which just takes a template and does the right thing for both transparent and [near-]opaque elements. Having both together might make for a bit of an unweildy filter as regards code readability, though. I dunno. All the best, Martin Atkins