Click here to Skip to main content
15,943,008 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm working on a project in C# and WPF where we will have a set of image tiles to be laid out in a grid to make up a large image, and we want to have an image viewer that allows efficient panning & zooming of the overall whole image using the image tiles.

We will probably be working with individual image tiles that are about 25 megapixels each, so we wouldn't want all of them to be loaded into memory at the same time - only the ones that would be currently visible on the screen as we pan & zoom.

What I have tried:

I've seen some pre-made C#/WPF controls for this, which cost money (and I haven't tried them yet). I've also been trying to make use of this maps control/library, but it seems like it might be a bit overly complicated for just panning & zooming a large image:
GMap.NET - Great Maps for Windows Forms and Presentation[^] (GitHub - radioman/greatmaps: GMap.NET - Great Maps for Windows Forms & Presentation[^])

With that maps control, I'm still struggling with doing the zooming with local images. One issue is that the tiles are fixed size (256x256), so I think I'd have to do some image cropping & combining to have it do the zooming as expected. Also, what we have is not a map, but just a collection of image tiles that make up a larger image.
Posted
Updated 16-Dec-20 6:02am
v3
Comments
[no name] 16-Dec-20 11:00am    
So, there's "panning and zooming"; but yours also has to be "efficient". And not "overly complicated". Also, it has to be "free". Is that about right?
CalicoSkies 16-Dec-20 11:58am    
Of course efficiency is a concern.. We will probably be working with individual image tiles that are about 25 megapixels each, so we wouldn't want them all loaded into memory at the same time. And something that costs money might not be a deal breaker. Also as far as overly complicated, what I was saying was it seems like using a map viewer is more complicated than necessary when I just want to use a set of local image tiles. I don't really need map stuff like latitude & longitude navigation, map markers, etc..
Andre_Prellwitz 17-Dec-20 12:23pm    
How are tiles 256x256 but also 25 megapixels each?

When someone suggests using a map viewer, it is because maps are almost universally broken into tiles which are loaded on demand when viewed. Not needing overlay features such as navigation and markers might be a concern if those are heavyweight features, but they aren't.

An alternative, related technology is "deep zoom", which I suspect you might need since you need 25MP tiles to be viewed at a size of 256x256 (though it's not clear if those tiles will ever be viewed/zoomed to full resolution).

https://stackoverflow.com/questions/43416574/is-there-a-modern-version-of-deep-zoom-composer-for-silverlight-that-allows-fo
CalicoSkies 17-Dec-20 15:54pm    
The map library uses screen tiles that are 256x256 in size, but the actual image files we want to display will be about 25 megapixels. We were planning to slice our images into smaller pieces for more efficient zooming (i.e., not loading all the pieces at the same time, ideally).

256x256 wasn't a size chosen by us - It just happens that the map library we're using uses screen tiles that are that size.

I've looked into DeepZoom. It seems the original DeepZoom was written for Silverlight, which is no longer supported. I've seen the article on the modern DeepZoom that you point to, and it's written in JavaScript - I'm not sure how easily that would be integrated into a C#/WPF project.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900