EDIT: Sorry, machinamentum already said what I wrote. But I still can add, that it would be easier to do it with sf2d_get_pixel (sf2d_texture *texture, int x, int y) and sf2d_set_pixel (sf2d_texture *texture, int x, int y, u32 new_color).
However in this case, you'll need sf2d_texture, but...