It states that the output is either JPEG or RGB bitmap. What is it in the case of a PPM thumb model? The output does not appear to be either a JPEG, bitmap, or PPM.
I've checked the header and it's certainly not PPM.
I've tried loading the buffer into a bitmap in Java and it fails.
I can however dump the PPM thumbnail via dcraw_thumb_writer, so it can be processed.