Added method to read jpg file