74.6. Where security has been given under section 74.1 and a conviction is pronounced or an order is made, the payment of the fine and costs is taken out of the security; the excess thereof is, as the case may be, remitted to the defendant. Where the complaint or information is dismissed, security is reimbursed to the defendant.