@Test
    void testSkipBlockTypes() throws ImagingException, IOException {
        final File imageFile = TestResources.resourceToFile("/images/jpeg/photoshop/IMAGING-246/FallHarvestKitKat_07610.jpg");
        final JpegImageMetadata metadata = (JpegImageMetadata) new JpegImageParser().getMetadata(ByteSource.file(imageFile), new JpegImagingParameters());
        final JpegPhotoshopMetadata photoshopMetadata = metadata.getPhotoshop();
        final PhotoshopApp13Data photoshopApp13Data = photoshopMetadata.photoshopApp13Data;
        final List<IptcBlock> blocks = photoshopApp13Data.getRawBlocks();
        assertEquals(2, blocks.size());
        for (final IptcBlock block : blocks) {
            if (block.getBlockType() == 1028 || block.getBlockType() == 1061) {
                // 0x0404 IPTC-NAA record
                // 0x0425 (Photoshop 7.0) Caption digest
                final byte[] data = block.getBlockData();
                assertTrue(data.length > 0);
            } else {
                fail("Unexpected block type found: " + block.getBlockType());
            }
        }
    }
Some block types (or Image Resource Blocks in Photoshop specification) have a recommendation to not be interpreted by parsers, as they are handled by
Photoshop in a special way, that varies by platform (e.g. Mac, Windows, etc).

IMAGING-246 provided a test image with APP13 segments, with some of the block types, such as 1084. When the IptcParser is reading this block, the 4-bytes
length record may give a value that is larger than the block size.

When such a case happens, the IptcParser fails with an exception, to avoid a memory error. To prevent that, the parser must be able to skip these blocks
that the specification says "It is recommended that you do not interpret or use this data".

@throws IOException      when reading input
@throws ImagingException when parsing file
@see <a href="https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/">Adobe Photoshop File Formats Specification</a>
src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcParserTest.java