Quantcast
Viewing all articles
Browse latest Browse all 18858

How to get and display a smaller 'sub image' from a larger 'master image'?

I'm using a WPF ImageControl which will display a subsection of a larger .gif image saved on disk.

This is what I want to do:

1) Load Larger .gif Image into Memory --> BitmapImage MyBigImage

2) Show a subsection of that image depending on the zoom factor which the operator can set. The operator will click on a 'Zoom in' button or a 'zoom out' button depending on what they want to see.

-- Essentially same behavior as google maps when you zoom in on a place; the containing rectangle stays the same size, but the image zooms out and in within that rectangle container.

How can I do this?

It can't be this hard, but I've been looking at ways to copy pixel arrays from the Big image and place into a new image, but that seems way too convoluted.

Thank you!


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>