Class ImageBlend

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--ImageBlend

public class ImageBlend
extends java.lang.Thread

ImageBlend is an algorithm to blend two images

Author:
Judy Robertson, SELLIC OnLine, Neil Brown, DAI, Timothy Sharman
See Also:
code.iface.imageblend

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ImageBlend(int firstwidth, int secondwidth)
          Constructs a new Image Blend
 
Method Summary
 int[] DoBlend(int[] src1_1d, float constant, float blend, int width, int height, float oset, float scale)
          Blends the specified input image by the constant, also adds offset and applies scaling.
 int[] DoBlend(int[] src1_1d, int[] src2_1d, float blend, int width, int height, float oset, float scale)
          Applies the image Blend operator on the specified image arrays, with the specified offset and scale value
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageBlend

public ImageBlend(int firstwidth,
                  int secondwidth)
Constructs a new Image Blend
Parameters:
firstwidth - The width of the first image
secondwidth - The width of the second image
Method Detail

DoBlend

public int[] DoBlend(int[] src1_1d,
                     int[] src2_1d,
                     float blend,
                     int width,
                     int height,
                     float oset,
                     float scale)
Applies the image Blend operator on the specified image arrays, with the specified offset and scale value
Parameters:
src1_1d - The first source image as a pixel array
src2_1d - The second source image as a pixel array
blend - The blending factor a float from 0..1
width - width of the destination image in pixels
height - height of the destination image in pixels
oset - The offset value
scale - The scale value
Returns:
A pixel array containing the blended image

DoBlend

public int[] DoBlend(int[] src1_1d,
                     float constant,
                     float blend,
                     int width,
                     int height,
                     float oset,
                     float scale)
Blends the specified input image by the constant, also adds offset and applies scaling.
Parameters:
src1_1d - The input pixel array
constant - The constant value to blend every pixel in the input array with
blend - The blending factor a float from 0..1
width - width of the destination image in pixels
height - height of the destination image in pixels
oset - The offset value
scale - The scaling value
Returns:
A pixel array containing the blended image