Can you put a condition on add_image_size() depending on the width of the uploaded image?

Can you put a condition on add_image_size() depending on the width of the uploaded image?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)