- Fixed jpeg preview error.
- Converted -ve charcodes from 2's compliment, which was causing
  problem while sending output buffer.