Alpha Blended Clipboards


Normal copying and pasting involves copying whole pixels from one area to another. However, it is possible to use an alpha channel to blend certain areas more smoothly. For example, here is a flat RGB image that has been exported from Inkscape that contains several smooth edges and colour blends:


If I were to lasso the objects and paste them over a red background, it would look like this:


As you can see the edges of the objects look odd, and the blends look out of place. There is a function in mtPaint that allows you to extract the blending properties of a paste and put them over any background while keeping the smoothness. As an example, use the first image above as a start point and then:

  • Select the black shapes with the rectangle selection box, copy and paste with Ctrl-C and Ctrl-V.
  • Select black as colour A and white as colour B from the palette.
  • Choose the menu option "Selection->Alpha blend A,B".
  • Drag the paste box over the red area and commit the paste by pressing ENTER. You should then see:


  • Clear the paste box with ESCAPE. Select, copy and paste the yellow shapes with the same procedure above, but choose yellow as colour A.
  • If you commit this second paste over the first you should end up with something like this:


    This technique works on any simple blend from one foreground colour to a background colour. It works well with antialiasing as found around text and geometric shapes created with programs like Inkscape which are exported to a lossless format like PNG. Note that you must export a PNG image from Inkscape with a flat colour background, not a transparent background.



    SourceForge.net Logo