# mglib

## Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes

# mg_blend.pro

includes main-level program

Blend two images together using the given alpha channel.

## top mg_blend

result = mg_blend(im1, im2 [, alpha_channel=float])

Blend two images together using the given alpha channel. If the images are of different interleaves they are converted to a common interleave:

* if one image is 2D and one is 3D, the 2D image is converted to the interleave of the 3D image (using the current color table) * if both images are 3D, the second image is converted to the interleave of the first image

image

### Parameters

im1 in required type=image

first image to blend

im2 in required type=image

second image to blend; must have the same xsize and ysize as im1, but may have a different number of bands

### Keywords

alpha_channel in optional type=float default=0.5

value in 0.0 - 1.0; 1.0 is all im1 and 0.0 is all im2; can be a scalar or a 2-dimensional image the same size as the combined images

### Examples

Run the main-level program at the end of this file with:

 IDL> .run mg_blend 
This should produce:

## File attributes

 Modification date: Wed May 14 15:07:15 2014 Lines: 95 Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.