{"id":1107341,"date":"2025-01-08T16:48:45","date_gmt":"2025-01-08T08:48:45","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1107341.html"},"modified":"2025-01-08T16:48:47","modified_gmt":"2025-01-08T08:48:47","slug":"python%e5%a6%82%e4%bd%95%e8%8e%b7%e5%8f%96%e5%9b%be%e5%83%8f%e7%9a%84%e7%bb%8f%e7%ba%ac%e5%ba%a6%e5%9d%90%e6%a0%87","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1107341.html","title":{"rendered":"python\u5982\u4f55\u83b7\u53d6\u56fe\u50cf\u7684\u7ecf\u7eac\u5ea6\u5750\u6807"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25071413\/75c9ca16-a120-4694-b32e-59f72217d2eb.webp\" alt=\"python\u5982\u4f55\u83b7\u53d6\u56fe\u50cf\u7684\u7ecf\u7eac\u5ea6\u5750\u6807\" \/><\/p>\n<p><p> <strong>\u8981\u83b7\u53d6\u56fe\u50cf\u7684\u7ecf\u7eac\u5ea6\u5750\u6807\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u4e2d\u7684Pillow\u5e93\u548cExifRead\u5e93\u6765\u8bfb\u53d6\u56fe\u50cf\u7684EXIF\u6570\u636e\u3002\u4e3b\u8981\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528ExifRead\u5e93\u8bfb\u53d6EXIF\u6570\u636e\u3001\u89e3\u6790GPS\u4fe1\u606f\u3001\u8f6c\u6362GPS\u5750\u6807\u683c\u5f0f\u3002<\/strong> \u5176\u4e2d\uff0c\u4f7f\u7528ExifRead\u5e93\u8bfb\u53d6EXIF\u6570\u636e\u662f\u6700\u4e3a\u6838\u5fc3\u7684\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u5fc5\u8981\u7684Python\u5e93<\/h3>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u5904\u7406\u56fe\u50cf\u4e4b\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684Python\u5e93\u3002\u5177\u4f53\u5305\u62ecPillow\u5e93\u548cExifRead\u5e93\u3002\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install Pillow<\/p>\n<p>pip install exifread<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u8bfb\u53d6\u56fe\u50cf\u6587\u4ef6\u7684EXIF\u6570\u636e<\/h3>\n<\/p>\n<p><p>EXIF\u6570\u636e\u662f\u5b58\u50a8\u5728JPEG\u548cTIFF\u56fe\u50cf\u6587\u4ef6\u4e2d\u7684\u5143\u6570\u636e\uff0c\u5b83\u5305\u542b\u4e86\u56fe\u50cf\u7684\u5404\u79cd\u4fe1\u606f\uff0c\u5305\u62ec\u62cd\u6444\u65f6\u95f4\u3001\u76f8\u673a\u8bbe\u7f6e\u548cGPS\u5750\u6807\u3002\u4f7f\u7528ExifRead\u5e93\u53ef\u4ee5\u65b9\u4fbf\u5730\u8bfb\u53d6\u8fd9\u4e9b\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u8bfb\u53d6\u56fe\u50cf\u6587\u4ef6\u7684EXIF\u6570\u636e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import exifread<\/p>\n<p>def read_exif_data(image_path):<\/p>\n<p>    with open(image_path, &#39;rb&#39;) as image_file:<\/p>\n<p>        tags = exifread.process_file(image_file)<\/p>\n<p>        return tags<\/p>\n<p>image_path = &#39;your_image.jpg&#39;<\/p>\n<p>exif_data = read_exif_data(image_path)<\/p>\n<p>for tag in exif_data.keys():<\/p>\n<p>    print(f&quot;{tag}: {exif_data[tag]}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u4f1a\u6253\u5370\u51fa\u56fe\u50cf\u6587\u4ef6\u7684\u6240\u6709EXIF\u6807\u7b7e\u548c\u5bf9\u5e94\u7684\u503c\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u89e3\u6790GPS\u4fe1\u606f<\/h3>\n<\/p>\n<p><p>EXIF\u6570\u636e\u4e2d\u7684GPS\u4fe1\u606f\u901a\u5e38\u5b58\u50a8\u5728\u7279\u5b9a\u7684\u6807\u7b7e\u4e2d\uff0c\u9700\u8981\u5bf9\u5176\u8fdb\u884c\u89e3\u6790\u624d\u80fd\u83b7\u5f97\u7ecf\u7eac\u5ea6\u5750\u6807\u3002\u4ee5\u4e0b\u662f\u89e3\u6790GPS\u4fe1\u606f\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def get_gps_info(exif_data):<\/p>\n<p>    gps_info = {}<\/p>\n<p>    gps_tags = [&#39;GPS GPSLatitude&#39;, &#39;GPS GPSLatitudeRef&#39;, &#39;GPS GPSLongitude&#39;, &#39;GPS GPSLongitudeRef&#39;]<\/p>\n<p>    for tag in gps_tags:<\/p>\n<p>        if tag in exif_data:<\/p>\n<p>            gps_info[tag] = exif_data[tag]<\/p>\n<p>    return gps_info<\/p>\n<p>gps_info = get_gps_info(exif_data)<\/p>\n<p>for tag, value in gps_info.items():<\/p>\n<p>    print(f&quot;{tag}: {value}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u8f6c\u6362GPS\u5750\u6807\u683c\u5f0f<\/h3>\n<\/p>\n<p><p>GPS\u5750\u6807\u901a\u5e38\u4ee5\u5ea6\u3001\u5206\u3001\u79d2\u7684\u683c\u5f0f\u5b58\u50a8\uff0c\u9700\u8981\u5c06\u5176\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u683c\u5f0f\uff0c\u4ee5\u4fbf\u4e8e\u8fdb\u4e00\u6b65\u4f7f\u7528\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5c06\u5ea6\u3001\u5206\u3001\u79d2\u683c\u5f0f\u7684GPS\u5750\u6807\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u683c\u5f0f\u7684\u51fd\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def convert_to_decimal_degrees(value, ref):<\/p>\n<p>    degrees = value.values[0]<\/p>\n<p>    minutes = value.values[1]<\/p>\n<p>    seconds = value.values[2]<\/p>\n<p>    decimal_degrees = degrees + (minutes \/ 60.0) + (seconds \/ 3600.0)<\/p>\n<p>    if ref == &#39;S&#39; or ref == &#39;W&#39;:<\/p>\n<p>        decimal_degrees = -decimal_degrees<\/p>\n<p>    return decimal_degrees<\/p>\n<p>latitude = convert_to_decimal_degrees(gps_info[&#39;GPS GPSLatitude&#39;], gps_info[&#39;GPS GPSLatitudeRef&#39;])<\/p>\n<p>longitude = convert_to_decimal_degrees(gps_info[&#39;GPS GPSLongitude&#39;], gps_info[&#39;GPS GPSLongitudeRef&#39;])<\/p>\n<p>print(f&quot;Latitude: {latitude}, Longitude: {longitude}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u7efc\u5408\u793a\u4f8b<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u6e05\u6670\u5730\u5c55\u793a\u6574\u4e2a\u8fc7\u7a0b\uff0c\u4e0b\u9762\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u8bfb\u53d6\u56fe\u50cf\u6587\u4ef6\u7684EXIF\u6570\u636e\u3001\u89e3\u6790GPS\u4fe1\u606f\u5e76\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u683c\u5f0f\u7684\u7ecf\u7eac\u5ea6\u5750\u6807\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import exifread<\/p>\n<p>def read_exif_data(image_path):<\/p>\n<p>    with open(image_path, &#39;rb&#39;) as image_file:<\/p>\n<p>        tags = exifread.process_file(image_file)<\/p>\n<p>        return tags<\/p>\n<p>def get_gps_info(exif_data):<\/p>\n<p>    gps_info = {}<\/p>\n<p>    gps_tags = [&#39;GPS GPSLatitude&#39;, &#39;GPS GPSLatitudeRef&#39;, &#39;GPS GPSLongitude&#39;, &#39;GPS GPSLongitudeRef&#39;]<\/p>\n<p>    for tag in gps_tags:<\/p>\n<p>        if tag in exif_data:<\/p>\n<p>            gps_info[tag] = exif_data[tag]<\/p>\n<p>    return gps_info<\/p>\n<p>def convert_to_decimal_degrees(value, ref):<\/p>\n<p>    degrees = value.values[0]<\/p>\n<p>    minutes = value.values[1]<\/p>\n<p>    seconds = value.values[2]<\/p>\n<p>    decimal_degrees = degrees + (minutes \/ 60.0) + (seconds \/ 3600.0)<\/p>\n<p>    if ref == &#39;S&#39; or ref == &#39;W&#39;:<\/p>\n<p>        decimal_degrees = -decimal_degrees<\/p>\n<p>    return decimal_degrees<\/p>\n<p>image_path = &#39;your_image.jpg&#39;<\/p>\n<p>exif_data = read_exif_data(image_path)<\/p>\n<p>gps_info = get_gps_info(exif_data)<\/p>\n<p>if gps_info:<\/p>\n<p>    latitude = convert_to_decimal_degrees(gps_info[&#39;GPS GPSLatitude&#39;], gps_info[&#39;GPS GPSLatitudeRef&#39;])<\/p>\n<p>    longitude = convert_to_decimal_degrees(gps_info[&#39;GPS GPSLongitude&#39;], gps_info[&#39;GPS GPSLongitudeRef&#39;])<\/p>\n<p>    print(f&quot;Latitude: {latitude}, Longitude: {longitude}&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;No GPS information found.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5904\u7406\u5176\u4ed6\u56fe\u50cf\u683c\u5f0f<\/h3>\n<\/p>\n<p><p>\u867d\u7136JPEG\u548cTIFF\u662f\u6700\u5e38\u89c1\u7684\u5305\u542bEXIF\u6570\u636e\u7684\u56fe\u50cf\u683c\u5f0f\uff0c\u4f46\u6709\u4e9b\u5176\u4ed6\u683c\u5f0f\u4e5f\u53ef\u80fd\u5305\u542b\u7c7b\u4f3c\u7684\u5143\u6570\u636e\u3002\u5bf9\u4e8e\u8fd9\u4e9b\u683c\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528Pillow\u5e93\u6765\u8bfb\u53d6\u56fe\u50cf\u5e76\u63d0\u53d6\u5176\u5143\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528Pillow\u5e93\u8bfb\u53d6\u56fe\u50cf\u5e76\u63d0\u53d6\u5176\u5143\u6570\u636e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import Image<\/p>\n<p>from PIL.ExifTags import TAGS<\/p>\n<p>def get_exif_data(image_path):<\/p>\n<p>    image = Image.open(image_path)<\/p>\n<p>    exif_data = image._getexif()<\/p>\n<p>    if exif_data is not None:<\/p>\n<p>        exif = {<\/p>\n<p>            TAGS.get(tag, tag): value<\/p>\n<p>            for tag, value in exif_data.items()<\/p>\n<p>        }<\/p>\n<p>        return exif<\/p>\n<p>    return {}<\/p>\n<p>image_path = &#39;your_image.jpg&#39;<\/p>\n<p>exif_data = get_exif_data(image_path)<\/p>\n<p>for tag, value in exif_data.items():<\/p>\n<p>    print(f&quot;{tag}: {value}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u5904\u7406\u7f3a\u5931\u7684EXIF\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u56fe\u50cf\u6587\u4ef6\u53ef\u80fd\u7f3a\u5c11EXIF\u6570\u636e\uff0c\u7279\u522b\u662fGPS\u4fe1\u606f\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u9700\u8981\u5904\u7406\u8fd9\u4e9b\u7f3a\u5931\u6570\u636e\uff0c\u5e76\u7ed9\u4e88\u76f8\u5e94\u7684\u63d0\u793a\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5904\u7406\u7f3a\u5931EXIF\u6570\u636e\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import exifread<\/p>\n<p>def read_exif_data(image_path):<\/p>\n<p>    try:<\/p>\n<p>        with open(image_path, &#39;rb&#39;) as image_file:<\/p>\n<p>            tags = exifread.process_file(image_file)<\/p>\n<p>            return tags<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;Error reading EXIF data: {e}&quot;)<\/p>\n<p>        return {}<\/p>\n<p>def get_gps_info(exif_data):<\/p>\n<p>    gps_info = {}<\/p>\n<p>    gps_tags = [&#39;GPS GPSLatitude&#39;, &#39;GPS GPSLatitudeRef&#39;, &#39;GPS GPSLongitude&#39;, &#39;GPS GPSLongitudeRef&#39;]<\/p>\n<p>    for tag in gps_tags:<\/p>\n<p>        if tag in exif_data:<\/p>\n<p>            gps_info[tag] = exif_data[tag]<\/p>\n<p>    return gps_info<\/p>\n<p>def convert_to_decimal_degrees(value, ref):<\/p>\n<p>    degrees = value.values[0]<\/p>\n<p>    minutes = value.values[1]<\/p>\n<p>    seconds = value.values[2]<\/p>\n<p>    decimal_degrees = degrees + (minutes \/ 60.0) + (seconds \/ 3600.0)<\/p>\n<p>    if ref == &#39;S&#39; or ref == &#39;W&#39;:<\/p>\n<p>        decimal_degrees = -decimal_degrees<\/p>\n<p>    return decimal_degrees<\/p>\n<p>image_path = &#39;your_image.jpg&#39;<\/p>\n<p>exif_data = read_exif_data(image_path)<\/p>\n<p>gps_info = get_gps_info(exif_data)<\/p>\n<p>if gps_info:<\/p>\n<p>    latitude = convert_to_decimal_degrees(gps_info[&#39;GPS GPSLatitude&#39;], gps_info[&#39;GPS GPSLatitudeRef&#39;])<\/p>\n<p>    longitude = convert_to_decimal_degrees(gps_info[&#39;GPS GPSLongitude&#39;], gps_info[&#39;GPS GPSLongitudeRef&#39;])<\/p>\n<p>    print(f&quot;Latitude: {latitude}, Longitude: {longitude}&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;No GPS information found.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u5904\u7406\u5927\u6279\u91cf\u56fe\u50cf<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u5904\u7406\u5927\u91cf\u56fe\u50cf\u6587\u4ef6\uff0c\u53ef\u4ee5\u5c06\u4e0a\u8ff0\u4ee3\u7801\u5c01\u88c5\u5230\u4e00\u4e2a\u51fd\u6570\u4e2d\uff0c\u5e76\u904d\u5386\u56fe\u50cf\u6587\u4ef6\u5217\u8868\u6765\u5904\u7406\u6bcf\u4e00\u4e2a\u56fe\u50cf\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u6279\u91cf\u5904\u7406\u56fe\u50cf\u6587\u4ef6\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import exifread<\/p>\n<p>def read_exif_data(image_path):<\/p>\n<p>    try:<\/p>\n<p>        with open(image_path, &#39;rb&#39;) as image_file:<\/p>\n<p>            tags = exifread.process_file(image_file)<\/p>\n<p>            return tags<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;Error reading EXIF data: {e}&quot;)<\/p>\n<p>        return {}<\/p>\n<p>def get_gps_info(exif_data):<\/p>\n<p>    gps_info = {}<\/p>\n<p>    gps_tags = [&#39;GPS GPSLatitude&#39;, &#39;GPS GPSLatitudeRef&#39;, &#39;GPS GPSLongitude&#39;, &#39;GPS GPSLongitudeRef&#39;]<\/p>\n<p>    for tag in gps_tags:<\/p>\n<p>        if tag in exif_data:<\/p>\n<p>            gps_info[tag] = exif_data[tag]<\/p>\n<p>    return gps_info<\/p>\n<p>def convert_to_decimal_degrees(value, ref):<\/p>\n<p>    degrees = value.values[0]<\/p>\n<p>    minutes = value.values[1]<\/p>\n<p>    seconds = value.values[2]<\/p>\n<p>    decimal_degrees = degrees + (minutes \/ 60.0) + (seconds \/ 3600.0)<\/p>\n<p>    if ref == &#39;S&#39; or ref == &#39;W&#39;:<\/p>\n<p>        decimal_degrees = -decimal_degrees<\/p>\n<p>    return decimal_degrees<\/p>\n<p>def process_images(image_folder):<\/p>\n<p>    for root, dirs, files in os.walk(image_folder):<\/p>\n<p>        for file in files:<\/p>\n<p>            if file.lower().endswith((&#39;.jpg&#39;, &#39;.jpeg&#39;, &#39;.tiff&#39;)):<\/p>\n<p>                image_path = os.path.join(root, file)<\/p>\n<p>                exif_data = read_exif_data(image_path)<\/p>\n<p>                gps_info = get_gps_info(exif_data)<\/p>\n<p>                if gps_info:<\/p>\n<p>                    latitude = convert_to_decimal_degrees(gps_info[&#39;GPS GPSLatitude&#39;], gps_info[&#39;GPS GPSLatitudeRef&#39;])<\/p>\n<p>                    longitude = convert_to_decimal_degrees(gps_info[&#39;GPS GPSLongitude&#39;], gps_info[&#39;GPS GPSLongitudeRef&#39;])<\/p>\n<p>                    print(f&quot;Image: {file}, Latitude: {latitude}, Longitude: {longitude}&quot;)<\/p>\n<p>                else:<\/p>\n<p>                    print(f&quot;Image: {file}, No GPS information found.&quot;)<\/p>\n<p>image_folder = &#39;path_to_your_image_folder&#39;<\/p>\n<p>process_images(image_folder)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u8bfb\u53d6\u56fe\u50cf\u6587\u4ef6\u7684EXIF\u6570\u636e\uff0c\u5e76\u63d0\u53d6\u5176\u4e2d\u7684GPS\u4fe1\u606f\u6765\u83b7\u53d6\u56fe\u50cf\u7684\u7ecf\u7eac\u5ea6\u5750\u6807\u3002<strong>\u5173\u952e\u6b65\u9aa4\u5305\u62ec\uff1a\u5b89\u88c5\u5fc5\u8981\u7684\u5e93\u3001\u8bfb\u53d6EXIF\u6570\u636e\u3001\u89e3\u6790GPS\u4fe1\u606f\u3001\u8f6c\u6362\u5750\u6807\u683c\u5f0f<\/strong>\u3002\u5728\u5904\u7406\u5927\u6279\u91cf\u56fe\u50cf\u6587\u4ef6\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u6279\u5904\u7406\u65b9\u6cd5\u6765\u63d0\u9ad8\u6548\u7387\u3002\u5e0c\u671b\u8fd9\u4e9b\u793a\u4f8b\u4ee3\u7801\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7406\u89e3\u548c\u5b9e\u73b0\u56fe\u50cf\u7ecf\u7eac\u5ea6\u5750\u6807\u7684\u83b7\u53d6\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8bfb\u53d6\u56fe\u50cf\u7684EXIF\u6570\u636e\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528PIL\u5e93\uff08Pillow\uff09\u548cexifread\u5e93\u6765\u8bfb\u53d6\u56fe\u50cf\u7684EXIF\u6570\u636e\u3002EXIF\u6570\u636e\u901a\u5e38\u5305\u542b\u62cd\u6444\u65f6\u7684\u7ecf\u7eac\u5ea6\u4fe1\u606f\u3002\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5\u8fd9\u4e9b\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7pip\u547d\u4ee4\u6765\u5b9e\u73b0\u3002\u8bfb\u53d6\u56fe\u50cf\u540e\uff0c\u901a\u8fc7\u8bbf\u95eeEXIF\u5b57\u5178\u4e2d\u7684\u7ecf\u7eac\u5ea6\u6807\u7b7e\uff0c\u53ef\u4ee5\u83b7\u53d6\u5230\u76f8\u5e94\u7684\u5750\u6807\u4fe1\u606f\u3002<\/p>\n<p><strong>\u83b7\u53d6\u7ecf\u7eac\u5ea6\u5750\u6807\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u56fe\u50cf\u683c\u5f0f\uff1f<\/strong><br \/>\u5e76\u975e\u6240\u6709\u56fe\u50cf\u6587\u4ef6\u90fd\u5305\u542bEXIF\u6570\u636e\uff0c\u5e38\u89c1\u7684\u683c\u5f0f\u5982JPEG\u548cTIFF\u901a\u5e38\u4f1a\u5305\u542b\u8fd9\u4e9b\u4fe1\u606f\uff0c\u800cPNG\u548cGIF\u5219\u4e0d\u652f\u6301EXIF\u3002\u56e0\u6b64\uff0c\u5728\u5904\u7406\u56fe\u50cf\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u4f60\u7684\u56fe\u50cf\u683c\u5f0f\u652f\u6301EXIF\u6570\u636e\uff0c\u4ee5\u4fbf\u80fd\u591f\u6210\u529f\u63d0\u53d6\u7ecf\u7eac\u5ea6\u5750\u6807\u3002<\/p>\n<p><strong>\u5982\u679c\u56fe\u50cf\u6ca1\u6709\u7ecf\u7eac\u5ea6\u4fe1\u606f\uff0c\u5e94\u8be5\u5982\u4f55\u5904\u7406\uff1f<\/strong><br \/>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u56fe\u50cf\u53ef\u80fd\u4e0d\u5305\u542b\u7ecf\u7eac\u5ea6\u4fe1\u606f\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u5176\u4ed6\u65b9\u6cd5\u6765\u83b7\u53d6\u4f4d\u7f6e\u6570\u636e\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u56fe\u50cf\u7684\u6587\u4ef6\u540d\u3001\u8def\u5f84\u4fe1\u606f\u6216\u7ed3\u5408\u5176\u4ed6\u6570\u636e\u6e90\uff08\u5982\u5730\u56feAPI\uff09\u6765\u63a8\u65ad\u56fe\u50cf\u7684\u5730\u7406\u4f4d\u7f6e\u3002\u786e\u4fdd\u5728\u5904\u7406\u8fd9\u4e9b\u56fe\u50cf\u65f6\uff0c\u8bb0\u5f55\u4e0b\u7f3a\u5931\u4f4d\u7f6e\u7684\u60c5\u51b5\uff0c\u4ee5\u4fbf\u4e8e\u540e\u7eed\u7684\u6570\u636e\u6574\u7406\u548c\u5206\u6790\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u83b7\u53d6\u56fe\u50cf\u7684\u7ecf\u7eac\u5ea6\u5750\u6807\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u4e2d\u7684Pillow\u5e93\u548cExifRead\u5e93\u6765\u8bfb\u53d6\u56fe\u50cf\u7684EXIF\u6570\u636e\u3002\u4e3b [&hellip;]","protected":false},"author":3,"featured_media":1107351,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1107341"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1107341"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1107341\/revisions"}],"predecessor-version":[{"id":1107355,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1107341\/revisions\/1107355"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1107351"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1107341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1107341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1107341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}