Author Topic: Displaying very large images  (Read 2658 times)

Offline niceday

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Displaying very large images
« on: February 18, 2016, 04:30:45 PM »
Firstly, a huge thank you for creating ImageBox. It has saved me considerable time on an open source project I'm currently in the early stages of working on.

My issue is that I sometimes need to display large images, for example, a 1920 * 50000 png image (although this can be larger). Trying to load these large images in an ImageBox causes the application to freeze and become unresponsive.

Loading images this large into a .NET application is a general problem, not an ImageBox problem, but I wondering if you knew of a way to display these large images using ImageBox?



Offline Richard Moss

  • Cyotek Team
  • Administrator
  • Sr. Member
  • *****
  • Posts: 291
  • Karma: +17/-0
    • cyotek.com
Re: Displaying very large images
« Reply #1 on: February 18, 2016, 05:22:15 PM »
Hello,

Thanks for the post, I'm glad you find ImageBox useful!

For actually displaying huge images, I'd probably suggest using virtual mode and breaking your image into smaller images and then paint the visible selection them using the virtual draw method - this sort of grid based painting seems to be the way things like Google/Bing Maps etc work.

As for the image loading problem, I've never tried loading images that big myself so it's not an issue I've come across before.

Have you looked at something like FreeImage? I use this myself to support loading of various image formats, I wonder if this might be more suited to loading larger images if GDI+ is choking. Or, if it could at least load the RGBA data for you to custom process (e.g. creating smaller images)

Offhand I can't really think of anything better, except writing a custom PNG decoder which I would imagine to be a pretty complex task!

Sorry I can't be more specific :(

Regards;
Richard Moss