I think both SDL and SFML are a very bad choice for such a program
What you need is a "real" windowing framework like Qt. It will load every format that you possibly want, and give you all the windowing functions that you need (setTitle). SFML and SDL are made for real-time multimedia; an image viewer doesn't exactly fit in this category.
By the way, GIF is badly supported in open-source libraries because as far I as know, it was still patented until recently.