When I tried to create PDJpeg objects and display them in a created PDF file, I found out that the PDJpeg object accepts grayscale JPG's and treats them as color "RGB" images by default, without error or comment.
Due to this mismatch, the images are damaged, and will not appear when the PDF file is displayed in a reader. Once I determined the mismatch to be the problem, I had to alter my code to pre-read the JPG files and, if they were gray-scale, set the ColorSpace of the PDJpeg object. I had to add code to read the JPG files with the ImageIO static "read" method, and check the depth of the image. Is this the way the PDJpeg object is supposed to work?