added feature: extraction of a subimage as JSON