Bug fix for packByteArray
Bug fix for non-8bit palette color image