@Test
public void testJpeg() throws TaskIOException, IOException {

    PDImageXObject result = PageImageWriter.toPDXImageObject(customNonPdfInput("image/large.jpg"));
    assertThat(result.getColorSpace(), is(PDDeviceRGB.INSTANCE));
    assertThat(result.getHeight(), is(3840));
    assertThat(result.getWidth(), is(5760));
    assertTrue("Original bytes should be used",
            IOUtils.contentEquals(result.getCOSObject().getFilteredStream(), customNonPdfInput("image/large.jpg").getSource()));
}