This is what I have right now. pasted by Jubjub on Tue Apr 1 20:01:50 2014
(define stbi-load
(foreign-lambda* c-pointer ((c-string filename)
((c-pointer integer) width)
((c-pointer integer) height))
"int components;
return stbi_load(filename, width, height, &components, 4);"))
stbi-load added by DerGuteMoritz on Tue Apr 1 20:38:50 2014
(define (stbi-load filename)
(let-location ((width int)
(height int))
(let* ((ptr ((foreign-lambda (c-pointer unsigned-char) stbi_load c-string (c-pointer int) (c-pointer int))
filename
(location width)
(location height)))
(size (* width height 4))
(result (make-u8vector size)))
(move-memory! ptr result size)
(free ptr)
result)))