Iphone:将 UIImage 转换为 RGB888 并再次转换回来

发布于 2024-10-14 13:36:51 字数 155 浏览 5 评论 0原文

我需要将图像转换为 RGB888,以便可以对其执行一些效果,一旦完成,我将收到修改后的图像,然后我需要将其从 RGB888 转换回 UIImage 进行显示。

有谁知道我是否可以研究任何好的图书馆或为我指明一个好的方向?

任何帮助将不胜感激。

谢谢

I have a requirement to convert a image to RGB888 so some effects can be performed on it, once it is done, I will receive the modified image, and I will then need to convert it from the RGB888 back to a UIImage for display.

Does anyone know if any good libraries I could look into or point me in a good direction?

Any help would be greatly appreciated.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

把时间冻结 2024-10-21 13:36:51

如果您想要访问特定色彩空间中的各个像素,则需要将图像渲染到 CGBitmapContext 中。 Apple 有一个关于这个主题的技术问答。要在 iOS 上使用它,您需要使用 UIImageCGImage 属性。请记住,处理大图像非常消耗处理器和内存。

You'll need to render your image into a CGBitmapContext if you want access to the individual pixels in a particular colorspace. Apple has a Technical Q&A about this very topic. To use it on iOS, you'll need to use the CGImage property of your UIImage. Remember that manipulating large images is very processor- and memory-intensive.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文