Changing the number of pixels while running the application