Limit image size to 1024*1024 for b2g.