Before an image signal sampled from a sequence signal can be used, it must be converted to the image size and type of the sequence. This ensures that sampling a sequence always yields a consistent image.
Rivl_ComputeSeqImages samples seq from start seconds to end seconds at sampleRate frames per second. It returns a pointer to a dynamically allocated array of image signals in *outImagesPtr and the number of images in *outCountPtr. It is the user's responsibility to free *outImagesPtr. The image signals in *outImagesPtr are processed with Rivl_SeqResolveImage to ensure that they match seq's image size and type.
Rivl_SeqResolveImage converts image, a value sampled from seq, into a valid image with the proper size and type. If image is NULL, then a proper blank image is returned. Otherwise, the size and type of image are matched up with the image size and type of seq. If image's size does not match seq's image size, it is changed. If image's type does not match seq's image type, image is converted. Both of the changes are non-destructive; image is duplicated before either takes place. Rivl_SeqResolveImage returns the resulting image, which will be the same as image if both its size and type were ok.
Rivl_CreateSeqProtoImage returns a blank image signal of the type given by valueType and of the size given by width and height. The result is a suitable value for a signal's protoImage property.