def METHOD_NAME(args, src_image_root, dst_image_root):
    # Dirty hack for multi-processing
    img_idx, img_info, anns = args
    src_img = Image.open(osp.join(src_image_root, img_info['file_name']))
    labels = []
    for ann_idx, ann in enumerate(anns):
        attrs = ann['attributes']
        text_label = attrs['transcription']
        # Ignore illegible or non-English words
        if not attrs['legible'] or attrs['language'] != 'english':
            continue
        x, y, w, h = ann['bbox']
        x, y = max(0, math.floor(x)), max(0, math.floor(y))
        w, h = math.ceil(w), math.ceil(h)
        dst_img = src_img.crop((x, y, x + w, y + h))
        dst_img_name = f'img_{img_idx}_{ann_idx}.jpg'
        dst_img_path = osp.join(dst_image_root, dst_img_name)
        # Preserve JPEG quality
        dst_img.save(dst_img_path, qtables=src_img.quantization)
        labels.append({
            'file_name': dst_img_name,
            'anno_info': [{
                'text': text_label
            }]
        })
    src_img.close()
    return labels