douyudouchao6779 2015-01-15 07:19
浏览 296
已采纳

使用Go和OpenCV读取/写入图像中的ICC配置文件

I'm writing code to resize images with Go and the go-opencv package. After the resize happens, the image that I write out is missing the ICC profile from the original image.

Are there any Go or C libraries that can read/write ICC profiles? The goal is to not use command line tools but Go/C libraries so I can do all of this within the process. I know exiftool exists and can do this for me, but I'd rather not shell out to a perl script.

  • 写回答

2条回答 默认 最新

  • dongtazu3080 2015-01-18 17:38
    关注

    After more research, I've found libvips and the go bindings.

    libvips doesn't strip any embedded profiles. This blog post mentions this:

    The file load/save operations (like tiffload, jpegsave etc.) don't do anything with colour. On load they attach any ICC profiles they see to the vips image as metadata and on save they write any attached profile to the file. They aim to give you something very close to what's actually stored in the file and leave colour processing for you to arrange.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料