bugGnash - The GNU Flash player - Bugs: bug #47540, Gnash should support rendering SWF...

 
 

bug #47540: Gnash should support rendering SWF without background color

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Sat 26 Mar 2016 08:19:11 AM UTC
   
 
Category:  renderer Severity:  3 - Normal
Release:  master Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 27 Mar 2016 02:49:42 PM UTC, comment #3: 

The attached `force-agg-transparent-background.patch` is an
experimental patch which forces Gnash AGG renderer's background color
to RGBA #FFFFFF00 (a.k.a. transparent).

Once the patch is applied, PNG files generated via `gnash --screenshot` and
raw video generated via `dump-gnash -D` would now have transparent background.

Note:

  • It is intended for people who want to try transparent background right now. It is not meant to be included in the mainline.
  • It supports only AGG (default) renderer.
  • It has a side effect causing SWF to be displayed with black background in normal player/plugin. (I haven't looked closely into this yet)
  • It provides no means to turn transparency off.


Gnash: 0.8.11dev (patched against git a72afa5 9-Mar-2016)
System: Debian GNU/Linux 7.0 Wheezy i386


(file #36780)

Nutchanon Wetchasit <nachanon>
Sun 27 Mar 2016 02:31:36 PM UTC, comment #2: 

I have done additional research on Gnash's screenshotting mechanism
and some bits on Gnash's AGG-based rendering; I found that Gnash is,
in fact:

  • ...already using 32-bit RGBA pixel format when rendered in `dump-gnash`.
  • ...apparently using some form* of truecolor+alpha pixel format when rendered in `gtk-gnash`.
  • ...already using 32-bit PNG screenshot output (if requested to save screenshot in PNG format).
  • ...already using 32-bit RGBA raw video format when dumping video.


Things that need to be done are just adding capability to turn SWF background
rendering off, and providing switch (`--transparent` or something similar)
to enable it.

Gnash: 0.8.11dev (git a72afa5 9-Mar-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

*Note: AGG pixel format on `gtk-gnash` is set to the format queried from GDK.
I'm still not sure how different display configuration could affect this.
(e.g. When user is using 16bpp display mode)

Nutchanon Wetchasit <nachanon>
Sat 26 Mar 2016 08:22:19 AM UTC, comment #1: 

Note (as a clarification): This feature request is related to Gnash's
video dumping and screenshotting mechanism. For the different issue
related to transparent windowing mode of Gnash plugin, see bug #23091.

Nutchanon Wetchasit <nachanon>
Sat 26 Mar 2016 08:19:11 AM UTC, original submission:  

This entry is not a bug, but rather a feature request.

Follow up from a mailing list discussion:
https://lists.gnu.org/archive/html/gnash/2015-07/msg00000.html
https://lists.gnu.org/archive/html/gnash/2015-07/msg00001.html

I have been wondering about possibility to use Gnash as a general-purpose
animation renderer for a long time. But as SWF has an opaque color-filled
background, the rendered animation frames couldn't be easily overlaid on
other pieces of film or video. To accomodate these uses, Gnash would need
to support rendering/screenshotting/video-dumping SWF without filling
background color.

In order to make this work, Gnash (at least with AGG-based renderer)
would have to do following things:

  • Gnash would need to support 32-bit RGB+alpha PNG screenshot output.
  • Gnash would need to support 32-bit RGB+alpha video output.
  • Renderer would need to render with alpha channel support, on alpha-supporting canvas.
  • Gnash would need to be able to turn off rendering of SWF background color (or render it as transparent) on request.
  • Gnash would need to provide a command line switch to turn off SWF background.


Gnash: 0.8.11dev (git a72afa5 9-Mar-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #36780:  force-agg-transparent-background.patch added by nachanon (715B - text/x-diff - Experental patch to force AGG to render SWF background as transparent)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nachanon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-27 nachanon Attached File- Added force-agg-transparent-background.patch, #36780

    Back to the top

    Powered by Savane 3.14-8eb0.
    Corresponding source code