免费下载建设银行官方网站下载做网站哪里接单
- 作者: 五速梦信息网
- 时间: 2026年03月21日 10:21
当前位置: 首页 > news >正文
免费下载建设银行官方网站下载,做网站哪里接单,网站的动态文字是怎么做的,剑灵网站模板一、java实现 小编看了很多技术博客#xff0c;但是测试要么下载的jar包中的api和博客对不上#xff0c;要么就是不对#xff0c;总之没实现 Java 读取图片信息 java 写入 exif 信息 使用Java读取和修改图片的Exif信息 java获取图片的GPS信息 https://drewnoakes.com/code/e…一、java实现 小编看了很多技术博客但是测试要么下载的jar包中的api和博客对不上要么就是不对总之没实现 Java 读取图片信息 java 写入 exif 信息 使用Java读取和修改图片的Exif信息 java获取图片的GPS信息 https://drewnoakes.com/code/exif/ https://github.com/drewnoakes/metadata-extractor/ java 修改图片exif信息 JAVA 使用metadata-extractor添加水印 java 修改照片exif信息 ava图片识别文字软件 java识别图片文字 原理 java 修改图片exif信息 如何用一张照片进行GPS定位 https://www.jb51.net/program/319520ppk.htm https://blog.csdn.net/qq_40985985/article/details/118605888 https://blog.51cto.com/u_16213361⁄10406427 https://blog.csdn.net/m0_51363655/article/details/125554155 https://blog.csdn.net/weixin_42350212/article/details/118467097 二、python实现 引用给家里的老照片添加时间、地点信息方便查找回忆 from PIL import Image, ImageTk from piexif import load, dump, ImageIFD,GPSIFD import tkinter as tk from tkinter import filedialog, messagebox import pyperclipdef open_file():print(打开文件 start)file_path filedialog.askopenfilename(title选择图片文件)# file_path C:/Users/hahaha/Pictures/IMG_1089.JPGprint(file_path)img Image.open(file_path)img img.resize((400, 300))img ImageTk.PhotoImage(img)lable_img_display.config(imageimg)lable_img_display.image imgif file_path:print(打开文件:, file_path)# 打开图片image Image.open(file_path)img_name_old_label.config(textfile_path)# 读取图片的原始exif信息try:exif_dic load(image.info[exif])image_time exif_dic[0th][ImageIFD.DateTime]print(image_time)img_time_old_label.config(textimage_time)if exif_dic[GPS]:longtitude exif_dic[GPS][GPSIFD.GPSLongitude] # 经度print(format_data(longtitude))img_longtitude_old_label.config(textformat_data(longtitude))latitude exif_dic[GPS][GPSIFD.GPSLatitude]print(format_data(latitude))img_latitude_old_label.config(textformat_data(latitude)) # 纬度print(longtitude)print(latitude)print(format_data(format_data(longtitude)))else:print(无GPS信息)img_longtitude_old_label.config(textnone)img_latitude_old_label.config(textnone)passexcept:img_time_old_label.config(textnone)img_longtitude_old_label.config(textnone)img_latitude_old_label.config(textnone)def format_data(latlong):print(type(latlong))if type(latlong) float or type(latlong) str or type(latlong) int:latlong float(latlong)degree int(latlong)res_degree latlong - degreeminute int(res_degree * 60)res_minute res_degree * 60 - minuteseconds round(res_minute * 60, 3)_data ((degree, 1), (minute, 1), (int(seconds * 100), 100))return _dataelif type(latlong) tuple:_date latlong[0][0]latlong[1][0]/60latlong[2][0]/60/6000return _datedef save_file():file_path filedialog.asksaveasfilename()if file_path:print(保存文件:, file_path)def modify_exif():print(修改图片的exif信息)# 打开图片image_path img_name_old_label.cget(text)image Image.open(image_path)# 读取图片的原始exif信息try:exif_data load(image.info[exif])except:exif_data {}if 0th not in exif_data: # 判断是否存在基础信息 并创建基础信息exif_data[0th] {}if len(exif_data[0th]) 0:exif_data[0th] {271: bQRJ, #制造商272: bscanner,#型号# 274: 1, # 图像方向# 282: (72, 1), #ImageWidth 方向上每个 ResolutionUnit 的像素数# 283: (72, 1), #ImageLength方向上每个 ResolutionUnit 的像素数# 296: 2, #XResolution 和 YResolution 的测量单位。305: bIMG_EDITv1, #用于创建映像的软件包的名称和版本号。306: b2000:00:00 00:00:00, # 创建时间# 531: 1,# 指定子采样色度分量相对于亮度样本的位置。# 34665: 208,# 34853: 1786}exif_data[0th][ImageIFD.DateTime] img_time_new_text.get() # 创建基础exif空字典if GPS not in exif_data: # 判断是否存在基础GPS信息 并创建GPS基础信息exif_data[GPS] {} # 创建gps空字典if len(exif_data[GPS]) 0:exif_data[GPS] {1: bN, # 南北纬2: ((40, 1), (6, 1), (2386, 100)), # 纬度3: bE, #东西经4: ((116, 1), (32, 1), (5287, 100)), # 经度# 5: 0, #表示作为参考高度的高度# 6: (13973, 415), #根据 GPSAltitudeRef 中的参考值指示高度# 7: ((4, 1), (5, 1), (4760, 100)), #表示时间为 UTC协调世界时。# 12: bK, #表示用于表示 GPS 接收器移动速度的单位。# 13: (0, 1), #表示GPS接收器移动的速度# 16: bT, #表示在捕获图像时给出图像方向的参考。# 17: (10159, 338), #表示图像拍摄时的方向。# 23: bT, #表示用于给目标点方位的参考。# 24: (10159, 338), #表示到目的地的方位。# 29: b2000:00:00, #一个字符串记录相对于 UTC协调世界时的日期和时间信息。# 31: (65, 1) #指示是否对 GPS 接收器应用差分校正。}# if GPSIFD.GPSLongitude not in exif_data[GPS]:
exif_data[GPS][GPSIFD.GPSLongitude] [] # 创建gps空列表if img_longtitude_new_text.get() :messagebox.showinfo(提示, 请输入经度)returnexif_data[GPS][GPSIFD.GPSLongitude] format_data(img_longtitude_new_text.get()) # 更新经度
if GPSIFD.GPSLatitude not in exif_data[GPS]:
exif_data[GPS][GPSIFD.GPSLatitude] []if img_latitude_new_text.get() :messagebox.showinfo(提示, 请输入纬度)returnexif_data[GPS][GPSIFD.GPSLatitude] format_data(img_latitude_new_text.get()) # 更新纬度########################EXIF信息################################if Exif not in exif_data: # 判断是否存在Exif信息 并创建Exif信息exif_data[Exif] {}if len(exif_data[Exif]) 0:exif_data[Exif]
exif_data[Exif][36867] img_time_new_text.get() # 创建Exif时间信息#############Interop信息######################################## if Interop not in exif_data:# exif_data[Interop] {}# if len(exif_data[Interop]) 0:# exif_data[Interop] {1: bR98}##################1st############### if 1st not in exif_data:# exif_data[1st] {}# if len(exif_data[1st]) 0:# exif_data[1st] {# 259: 6,# 282: (72, 1),# 283: (72, 1),# 296: 2,# 513: 8916,# 514: 14640# }# 修改原始exif信息# exif_data.update(new_exif_dict)exif_bytes dump(exif_data)# 设置新的exif信息image.save(image_path, exifexif_bytes)def paste_location():# TODO: 从剪贴板中粘贴经纬度gps_infopyperclip.paste()print(gps_info)if , in gps_info:gps_info gps_info.split(,)img_longtitude_new_text.insert(tk.END, gps_info[0])img_latitude_new_text.insert(tk.END, gps_info[1])passif name main:# TODO: 实现GUI或者命令行接口让用户选择操作root tk.Tk()root.title(文件对话框)root.geometry(600x500)img_info_frame tk.Frame(root)img_info_frame.pack(pady20)img_name_label tk.Label(img_info_frame, text图片名称)img_name_label.grid(row0, column0)img_name_old_label tk.Label(img_info_frame, text原图片)img_name_old_label.grid(row0, column1)img_time_label tk.Label(img_info_frame, text图片时间)img_time_label.grid(row1, column0)img_time_old_label tk.Label(img_info_frame, text原图片时间)img_time_old_label.grid(row1, column1)img_time_new_text tk.Entry(img_info_frame, width20)img_time_new_text.grid(row1, column2)img_time_new_text.insert(tk.END, 2018:02:02 21:44:35)# img_time_new_text.config(statetk.DISABLED)img_longitude_label tk.Label(img_info_frame, text经度)img_longitude_label.grid(row2, column0)img_longtitude_old_label tk.Label(img_info_frame, text原经度)img_longtitude_old_label.grid(row2, column1)img_longtitude_new_text tk.Entry(img_info_frame, width20)img_longtitude_new_text.grid(row2, column2)img_latitude_label tk.Label(img_info_frame, text纬度)img_latitude_label.grid(row3, column0)img_latitude_old_label tk.Label(img_info_frame, text原纬度)img_latitude_old_label.grid(row3, column1)img_latitude_new_text tk.Entry(img_info_frame, width20)img_latitude_new_text.grid(row3, column2)button_frame tk.Frame(root,width600,height50)button_frame.pack()open_button tk.Button(button_frame, text打开单独文件, commandopen_file)open_button.grid(row4, column2)save_button tk.Button(button_frame, text保存文件, commandsave_file)save_button.grid(row4, column3)modify_button tk.Button(button_frame, text修改exif, commandmodify_exif)modify_button.grid(row4, column4)paste_button tk.Button(button_frame, text粘贴经纬度, commandpaste_location)paste_button.grid(row4, column5)website_text tk.Text(root, width54, height1)website_text.pack()website_text.insert(tk.END, https://api.map.baidu.com/lbsapi/getpoint/index.html)lable_img_display tk.Label(root,width400,height300)lable_img_display.pack()#webview2 创建坐标浏览页面# web_view tk.root.mainloop()pass引用单反相机照片用python 脚本添加gps位置信息 三方依赖库 pip install piexif pip install pywin32 pip install Pillow pip install pyinstaller# ecoding:utf-8 import os from PIL import Image import piexif import win32con import win32ui import ctypes 安装第三方包 pip install piexif pip install pywin32 pip install Pillow pip install pyinstaller 打包命令pyinstaller -F -i .\gps.ico .\gps.py
DIP缩放设置
awareness ctypes.c_int() errorCode ctypes.windll.shcore.GetProcessDpiAwareness(0, ctypes.byref(awareness)) errorCode ctypes.windll.shcore.SetProcessDpiAwareness(2) success ctypes.windll.user32.SetProcessDPIAware()def main():image_path browse(True)[1]gps_str input(请输入经纬度)arr gps_str.split(,)lng float(arr[1])lat float(arr[0])# 将经纬度与相对航高转为exif可用的经纬度与行高# exif需要的航高输入为(20000,2)格式表示高度为20000/100米# exif需要的经度与维度为((12, 1), (20,1), (41000, 1000))格式表示12度20分41秒lng_exif format_latlng(lng)lat_exif format_latlng(lat)_dict {lng: lng_exif, lat: lat_exif, lng_ref: E, lat_ref: N}print(写入文件, image_path)# 判断图片是否有exifread_check_exif(image_path)# 修改图片的exifread_modify_exif(image_path, _dict)def browse(mode: bool,default_name: str ,title: str 选择您的文件,file_type: str 图片文件(.jpg)|.jpg|,path: str desktop):弹出窗口返回保存或者选择的路径:param mode: False为 保存/另存为, True为 打开:param default_name:默认输入文件名:param title:窗口提示:param file_type:可选的文件类型,所有文件(.)|.|图片文件(.jpg)|.jpg|:param path::return:[存储类型、文件路径、文件类型]api_flag win32con.OFN_OVERWRITEPROMPT | win32con.OFN_FILEMUSTEXISTdlg win32ui.CreateFileDialog(mode, None, default_name, api_flag, file_type)dlg.SetOFNTitle(title)dlg.SetOFNInitialDir(os.path.abspath(path))dlg.DoModal()filename dlg.GetPathName()fileExt dlg.GetFileExt()if os.path.exists(filename):if_pass Trueelif not mode:if os.path.split(filename)[0] :if_pass Falseelse:if_pass Trueelse:if_pass Falsereturn [if_pass, filename, fileExt]def format_latlng(latlng):经纬度十进制转为分秒degree int(latlng)res_degree latlng - degreeminute int(res_degree * 60)res_minute res_degree * 60 - minuteseconds round(res_minute * 60.0, 3)return ((degree, 1), (minute, 1), (int(seconds * 1000), 1000))def read_check_exif(image_path):判断图片是否有exif信息,没有就写入初始exif信息:param image_path:图片路径:return:无img Image.open(image_path) # 读图try:exif_dict piexif.load(img.info[exif]) # 提取exif信息except KeyError:# 处理exif不存在的情况# 创建一个初始的EXIF字典exif_dict {0th: {}, Exif: {}, GPS: {}, Interop: {}, 1st: {}, thumbnail: None}# 将EXIF字典添加到图像的元数据中exif_bytes piexif.dump(exif_dict)img.save(image_path, exifexif_bytes)def read_modify_exif(image_path, _dict): 读取并且修改exif文件img Image.open(image_path) # 读图exif_dict piexif.load(img.info[exif]) # 提取exif信息exif_dict[GPS][piexif.GPSIFD.GPSLongitude] _dict[lng] # 修改经度exif_dict[GPS][piexif.GPSIFD.GPSLatitude] _dict[lat] # 修改纬度exif_dict[GPS][piexif.GPSIFD.GPSLongitudeRef] _dict[lng_ref] # odm需要读取一般为’Wexif_dict[GPS][piexif.GPSIFD.GPSLatitudeRef] _dict[lat_ref] # 一般为‘Nexif_bytes piexif.dump(exif_dict)piexif.insert(exif_bytes, image_path)if name main:main()可以用这个网站来看看位置信息 本工具可查看图片Exif信息、图片定位信息、图片GPS信息、图片经纬度信息 https://web.gpstool.com/index 拾取坐标 https://api.map.baidu.com/lbsapi/getpoint/index.html
- 上一篇: 免费下载简历模板网站白酒营销网站
- 下一篇: 免费下载建网站教程潍坊网站建设策划方案
相关文章
-
免费下载简历模板网站白酒营销网站
免费下载简历模板网站白酒营销网站
- 技术栈
- 2026年03月21日
-
免费下载的网站wordpress英文博客主题
免费下载的网站wordpress英文博客主题
- 技术栈
- 2026年03月21日
-
免费下载的网页模板安徽建站优化哪里有
免费下载的网页模板安徽建站优化哪里有
- 技术栈
- 2026年03月21日
-
免费下载建网站教程潍坊网站建设策划方案
免费下载建网站教程潍坊网站建设策划方案
- 技术栈
- 2026年03月21日
-
免费下载软件的网站网站设置关键词
免费下载软件的网站网站设置关键词
- 技术栈
- 2026年03月21日
-
免费下载软件的网站住房和城乡建设部网站主页
免费下载软件的网站住房和城乡建设部网站主页
- 技术栈
- 2026年03月21日






