Hi,
I have had a search to see if anyone had encountered this before but could not find anything on the forum.
I am currently using GDPicture.net 6.6 in a VS2005 C# project and have a toolkit that I need to integrate that is returning a System.Drawing.Image object that I need to display via GDPicture.net. Unfortunately I can't see a way of doing it despite having a search elsewhere. Is this possible and how do I do it?
Many thanks for your help
Displaying a System.Drawing.Image
Re: Displaying a System.Drawing.Image
It's amazing how a nights sleep can make you think a bit clearer. It think it was a case of not being able to see the wood for the trees and the answer was staring me in the face all the time. All I needed to do was cast the image to a bitmap and it worked perfectly:
this.gdvImage.DisplayFromBitmap((Bitmap)imagepage.ItemFront.Image);
where imagepage.ItemFront.Image is a system.drawing.image
If anyone can think of a better or safer way of getting this to work please let me know.
this.gdvImage.DisplayFromBitmap((Bitmap)imagepage.ItemFront.Image);
where imagepage.ItemFront.Image is a system.drawing.image
If anyone can think of a better or safer way of getting this to work please let me know.
Re: Displaying a System.Drawing.Image
The trouble with casting it to a bitmap first is that you lose information from a multi-page image (Tiff or Gif, for example), and you only get the first page.
I'm looking for a solution as well. My current line of thinking is that I can get a pointer to the image's location in memory and then call gdvImage.DisplayFromMemory()
I'm looking for a solution as well. My current line of thinking is that I can get a pointer to the image's location in memory and then call gdvImage.DisplayFromMemory()
Who is online
Users browsing this forum: No registered users and 2 guests