byte_new w h
Allocate a new physical ByteImage with width w and height h. Return a handle to the new ByteImage.
byte_clip byteImage x y w h
Create a new virtual ByteImage which points to a window within the existing ByteImage byteImage. The window starts at position (x, y) and has dimension w x h. Return a handle to the new virtual ByteImage.
byte_reclip byteImage x y w h clipped
This function is identical to ByteClip, except that it destructively modifies the virtual ByteImage clipped (instead of creating a new virtual ByteImage). Warning : memory leaks will occurs if clipped is a physical ByteImage.
byte_free byteImage
Deallocate a ByteImage . The ByteImage can be virtual or physical. If the ByteImage is virtual, only the header is deallocated, the content of the ByteImage remains. If the ByteImage is physical, all virtual ByteImages that depend on byteImage should not be used (because the pixel array they share with byteImage is deallocated by this function).
byte_set byteImage value
byte_set_with_mask byteImage bitMask value
Initialize all pixels in byteImage to value. The "with mask" form only copies where the corresponding pixel in bitMask is 1.
byte_set_mux_1 byteImage offset stride value
byte_set_mux_2 byteImage offset stride value
byte_set_mux_4 byteImage offset stride value
A ByteImage is divided into vertical strips, specified by three parameters : length, offset and stride. Length specifies the width of each strips. Offset is the distance of the first byte of the first strip from the first byte of each row in the ByteImage, and Stride is the distance between the strips. For example, the figure below shows the ByteImage with strips specified by length = 4, offset = 1, and stride = 2.
This group of primitives initialize strips in a ByteImage byteImage to value. The suffix of the name of the primitives specifies the width of the strips. offset and stride is specified using arguments to the primitives.
byte_copy src dest byte_copy_with_mask src bitMask dest
Copy the content of ByteImage src into ByteImage dest. The "with mask" form only copies where the corresponding pixel in bitMask is 1. The images must not overlap.
byte_copy_mux_1 src srcOffset srcStride dest destOffset destStride byte_copy_mux_2 src srcOffset srcStride dest destOffset destStride byte_copy_mux_4 src srcOffset srcStride dest destOffset destStride
These primitives copy the vertical strips of equal width from the src ByteImage into the dest ByteImage. The width of the strips is specified by the suffix of the primitives name. The offsets and strides are specified by the arguments to the primitives.
See the description of the byte_set_mux_1 primitive for a detail description of offset, stride and length.
byte_extend byteImage bw bh
Fills borders (of total width bw and height bh) of byteImage by copying pixels from the interior as shown. This function can be used in conjunction with byte_clip and byte_copy to prepare an image for convolution.
byte_get_x byteImage
byte_get_y byteImage
byte_get_width byteImage
byte_get_height byteImage
byte_get_virtual byteImage
These functions (macros in the C version) access various fields in the ByteImage data structure. The first two function return the x or y offset of byteImage within its parent, the next two return the width or height of byteImage, and the last function returns 1 if byteImage is virtual, 0 otherwise.
byte_hash byteImage
This function computes a hash value (a 32 bit signed integer) based on the pixel data in the image.
byte_info byteImage
Return a list of the form {x y width height virtual} that describes the attributes of byteImage. This function is more efficient than calling the five corresponding byte_get_* functions.
Last updated : Sunday, January 31, 1999, 05:56 PM