Bsoft function

img_place

Source:

src/img/img_combine.c

Description:

Places a small image into a large image.

Algorithm:

	The small image is placed with its origin at given origin in the large image.

The second image is scaled and shifted before placing into the first:
image1 = image1 + image2*scale + shift
Both images are converted to floating point.
The operation can be selected:
0 simple addition.
1 replace if smaller.
2 replace if larger.
Requirement: Both images must have the same pixel size.

Arguments:

Bimage* plarge image (destination, modified).
Bimage* psmallsmall image (source).
Vector3 originlocation in large image of small image origin.
float radiusradial mask to transfer small image.
float scaledensity scale to apply to second image.
float shiftdensity shift to apply to second image.
int operationoperation to apply.

Returns:

int 0, <0 if error.

Prototype:

int img_place(Bimage* p, Bimage* psmall, Vector3 origin, float radius, float scale, float shift, int operation)

Functions used:

balloc

Other objects included:

struct Bimage
struct Bmarker


Generated by bdoc.pl on Mon Jun 15 11:47:30 2009


Back to the Bsoft home