[英]How to load a Raw .NEF file into QImage without saving it in Python
[英]How to convert a NEF (raw image file type) to JPG in Python on Mac?
我正在尝试将 NEF RAW 图像转换为 JPG,但我发现并没有给出确切的肋骨值。 我使用的代码来自此链接: Using rawpy to convert multiple raw.NEF Images to TIFF
for i in path: with rawpy.imread(path) as raw: rgb = raw.postprocess() print(rgb) imageio.imsave(path + '.jpg', rgb)
从这段代码来看,我似乎缺少蓝色值(是的,我已经更改了路径以使其与 Mac 兼容)。
谢谢
for i in path:
with rawpy.imread(path) as raw:
rgb = raw.postprocess()
print(rgb)
imagename = str(path)+str(i)+".jpg"
imageio.imsave(imagename, rgb)
你能试试这个吗?
import glob
# All files and directories ending with .txt and that don't begin with a dot:
a=(glob.glob("D:\\ND750-1\\*.NEF"))
import rawpy
import imageio
from tqdm.notebook import tqdm
for i in tqdm(a):
with rawpy.imread(i) as raw:
rgb = raw.postprocess()
imageio.imsave(i.replace('NEF','jpg'), rgb)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.