I start when I find chr(0xFF) . chr(0xD8) in the blob file and end when I find chr(0xFF) . chr(0xD9)

These characters are not found when I decode through javascript but easily gets found when using base64_decode of php. There is a problem of encoding type I think and I'm a novice in the encoding methods. so kindly help.