![](/img/trans.png)
[英]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.