Add thread_limit
Add code to recognize image data format
Change thread limit from 25 to 20