Added a function decorator to the img.py class to suppress deprecation
warnings having to do with use of tostring(). If using PILLOW instead if
the original PIL library, tostring() is deprecated in favor of
tobytes(), and you'll see a ton of deprecation warnings.