fix limited range for picture viewer, OpenGL part only

see title. #2259 did not consider picture viewer