Added support for Raw Image Data

Added support for Raw Image Data
Speed improvement/Optimization