Allocate temporary imagelib stuff on stack