Add setpixelformat option; fix pixeldepth changing