'This is primarily used for debugging and 3rd party tools to
get the images in the file.'

def dump_images(self, output_dir):

    if (not os.path.exists(output_dir)):
        os.makedirs(output_dir)
    with CurrentDir(output_dir):
        for i in range(0, self.header_record.num_image_pages):
            (name, img) = self.get_image((self.header_record.image_data_offset + i))
            with open(name, 'wb') as imgf:
                imgf.write(img)
