在 iPad 上获取平铺图像集合(深度缩放)

发布于 2024-09-01 06:42:54 字数 658 浏览 5 评论 0原文

我有一组通过 Microsoft 的 Deep Zoom 编辑器创建的平铺图像集合,以及一个目前通过 MultiScaleImage 使用它们进行显示的 Silverlight 应用程序 - 一切都工作得很好 - 我只是想获得一些 iPad 编程经验和 对一些 iPad 应用程序有一些想法。我所有的想法都依赖于我能够显示/操作这些平铺图像集(在 iPad 上)。

我刚刚买了一台 iMac 来帮助实现这一点。不过,我没有看到任何 Objective-C / Cocoa-touch 库,所以我假设我必须推出自己的库。 Seadragon Ajax 组件,它非常灵活,但我在这里处理集合,它不支持。我还想将其作为本机应用程序来获得体验。)

(我看到了 我发现用于显示/操作平铺图像集的源项目是 Openzoom - 一个 Flash 组件。我也不熟悉 ActionScript(Python、Java、C# 和 c 是我真正使用过的唯一语言),但简要检查一下代码,我确实没有任何问题,并且可能可以使用它作为提示但是,由于我对 Objective-C/Cocoa-touch 还很陌生,因此我将不胜感激一些正确方向的指示。

1)我还缺少其他项目吗?或者 OpenZoom 是我最好的参考吗?

2)我应该尝试在 UIKit 框架中进行此显示,还是应该将其作为 OpenGL 显示?

3)我不想问的任何其他建议/指示。

I have a set of tiled image collections created via Microsoft's Deep Zoom composer, and a Silverlight application that currently consumes them for display via MultiScaleImage - it's all working pretty well - I'd just like to get some experience with iPad programming and
have a couple of ideas for some iPad applications. All my ideas rely on me being able to display/manipulate these tiled image sets (on the iPad).

I just picked up a iMac to facilitate this. I'm not seeing any Objective-C / Cocoa-touch libraries for this though, so am assuming I will have to roll my own. (I saw the Seadragon Ajax component, which is pretty slick, but I'm dealing with collections here, which it doesn't support. I would also like to roll this as a native application just to get the experience.)

The only open source project I found for displaying/manipulating the tiled image sets was Openzoom - a Flash component. I'm not to familiar with ActionScript either (Python, Java, C#, and c are the only languages I have really used), but briefly inspecting the code I didn't really have any issues with it and can probably use it for hints on how to swap the tiles in and out, etc. But, as I'm pretty new to Objective-C/Cocoa-touch, some pointers in the right direction would be appreciated.

1) Are there any other projects out there I am missing, or is OpenZoom my best bet for some reference?

2) Should I be trying to do this display in the UIKit framework, or should I do it as an OpenGL display?

3) Any other suggestions/pointers that I didn't think to ask.

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

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

发布评论

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

评论(5

草莓味的萝莉 2024-09-08 06:42:55

看一下 CATiled 层。请参阅我对类似问题的回答:使用 CoreGraphics CGContextDrawImage 在 CATiledLayer 中绘图< /a>

Take a look at CATiled Layer. See my answer to a similar question here: Drawing in CATiledLayer with CoreGraphics CGContextDrawImage

雾里花 2024-09-08 06:42:54

我刚刚开发了一些依赖于平铺大图像以允许深度缩放的应用程序。我找到了几个示例,但对我来说最好、最有用的是 Apple 的“PhotoScroller”示例代码。

它依靠 CATiledLayer 来处理平铺。其结果是一个极其流畅和响应灵敏的界面,即使是非常大的图像,而且不太复杂。 (有点复杂,但还不错)。

因此,直接回答您的问题:

  1. PhotoScroller 代码

  2. QuartzCore Framework(它是 SDK 的一部分)

  3. 有一个很棒的、免费的小 mac 应用程序,用于将图像切片为我经常使用的图块:“Tilen”

I have just been working on a few apps that rely on tiling large images to allow for deep zooming. I found a couple of examples but the best and most useful for me was Apple's "PhotoScroller" sample code.

It relies on CATiledLayer to handle the tiling. The result is an extremely smooth and responsive interface even with very large images and its not too complex. (A little complex but not too bad).

So to answer your question directly:

  1. PhotoScroller Code

  2. QuartzCore Framework (which is part of the SDK)

  3. There is a great, free little mac app for slicing images into tiles that I use a lot: "Tilen"
静谧 2024-09-08 06:42:54

在 WWDC 2010 源示例中,在 iOS 下,ScrollView Suite 中有一个名为 Tiling 的项目。它对应于 WWDC10 会议 104。它可能是最好的图像平铺示例。

In the WWDC 2010 source samples, under iOS, there is a project in the ScrollView Suite called Tiling. It corresponds to WWDC10 session 104. It is probably the best image tiling example out there.

命比纸薄 2024-09-08 06:42:54

您可以看看 RouteMe 库执行此操作的方式,动态加载更高分辨率的图块、平移等。https://github.com/route-me/route-me

You can take a look at they way RouteMe library does this, the dynamic loading of higher resolution tiles, panning, etc. https://github.com/route-me/route-me

甜点 2024-09-08 06:42:54

我不敢相信没有人告诉过您有关 UIScrollview 的事; UIScrollView 组件就是为此目的而设计的! (想想谷歌地图,它就使用它)。

查看类参考...
UIScrollView

您需要的委托方法如下......

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView

这允许您检查缩放级别、偏移等,然后提供缩放视图。这样,您就可以在平铺景观中保持您的“位置”,而与用于表示它的图形无关。

不要滚动自己的 UIScrollView,没有必要!

I can't believe nobody has told you about UIScrollview; the UIScrollView component is designed for this very purpose! (think Google Maps, which uses it).

Check out the class reference...
UIScrollView

The delegate method you require is the following....

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView

This allows you to check the zoom level, offset etc and then provide a view for zooming. This way you can maintain your 'position' within the tiled landscape independently of the graphics used to represent it.

Don't roll your own UIScrollView, no need to!

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