1

我用图像文件名提供图像浏览器视图,它管理加载它们。

有没有办法在加载它们后从浏览器中检索这些图像的 CGImageRef ?当用户单击图像时,我想用它们做一些核心动画。

4

1 回答 1

1

可能最简单的方法是使用 NSView 方法

-bitmapImageRepForCachingDisplayInRect:

为该区域构建一个 NSBitmapImageRep,然后

-cacheDisplayInRect:toBitmapImageRep:

画进去,然后是 NSBitmapImageRep 的

-CG图像

方法来获取 CGImageRef。

于 2009-05-01T16:05:25.313 回答