iOS:如何将像素从源复制到目标矩形?

发布于 2024-10-08 22:00:21 字数 61 浏览 0 评论 0原文

程序员们!有没有办法将位图数据从显示器的一个区域复制到另一个区域(如 Windows 中的 bitblt)?

programmers! Is there a way to copy bitmap-data from one region of the display to another (like bitblt in Windows)?

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

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

发布评论

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

评论(1

七颜 2024-10-15 22:00:21

您无权访问 iPhone 显示屏,但可以访问应用程序显示的任何视图或图像。

您可以从非合成视图中的任何矩形创建子图像,然后在其他位置(在同一视图或另一个视图中)(例如,在drawRect回调中)绘制该子图像。您还可以通过获取指向支持 UIView 的 CGBitmapContext 的指针来获取原始像素数据。

You don't have access to the iPhone display, but you can access any views or images your app is displaying.

You can create a subimage from any rectangle in a non-composited view, and then draw that subimage somewhere else (in the same view, or in another) in, say, a drawRect callback. You can also get at the raw pixel data by getting a pointer to the CGBitmapContext backing a UIView.

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