gfx:set-image-pixels

(gfx:set-image-pixels image coordinates colours)


Description:

Set individual pixel colours in image. NOTE: If you are really interested in pixel level manipulations I would strongly suggest you use the ObjC-Bridge, write an objc-function that takes your image as an argument and returns a new image: or far better still write a core image filter!


Arguments:

    coordinates -- a flat vector of x y coordinates

          image -- image

        colours -- a flat vector of rgba colours must equal length of coordinates * 2


Returns: boolean


Examples:

; set pixels 0,0 - 0,4 to white

(gfx:set-image-pixels image

                     (vector 0 0 0 1 0 2 0 3 0 4)

                     (vector 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))



Back to index