471,350 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

How to handle image buffers in C#

Hi,

we are planning to rewrite an extisting C++ image processing
application/library in C#. Now several question arouse where I hope you can
help me:

So far we allocated a block of memory as image buffer, handed this to a
driver dll and got raw image data back in this buffer. We then handed this
buffer by reference to another C++ dll to do base image processing on it.
Alternativly we copy an area of the whole image to a newly allocated
imagebuffer and then hand this over eitehr to this native dll or to an
client application that asks for an image buffer.

As in C++ handing an block of memory from one object to another due to
pointers is realy easy I do not know ho to do this in C#. We still will have
a native driver dll or at least a native COM component that captures images
into some buffer. For performance reasons we also will have some native C++
dll that does hard image processing. The control of the image capture and
tranfer of image data or part of it between capture and processing should be
handelt by C# objects. What is the best way to handle this.

Furthermore we have to offer an interface to Display the image buffers or to
provide a client application a handle to the image so that itself can
Display this images. How do I do this in C#. In our current solution we just
and a pointer to the Imagefuffer through C functions to the client so that
it can to a StretchDIBBits or to create a DirectDraw Surface for Displaying.

We would like to keep a possibility for the client apülication to visualize
Image Buffers or part of them by DirectDraw (fast scrolling ans Scaling) and
offer them also a possibilty to draw into this buffers to mark certain
areas. At this point we first make a copy of the imagebuffer to MemDC draw
into this and then use DirectDraw to get it to the Screen.

So please give a short primer how to handle image data in C#.

Best regards

Thomas
Jan 11 '06 #1
2 14242
Check out Bob Powell's GDI+ FAQ:

http://www.bobpowell.net/gdiplus_faq.htm

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

<SH******@newsgroup.nospam> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi,

we are planning to rewrite an extisting C++ image processing
application/library in C#. Now several question arouse where I hope you
can help me:

So far we allocated a block of memory as image buffer, handed this to a
driver dll and got raw image data back in this buffer. We then handed this
buffer by reference to another C++ dll to do base image processing on it.
Alternativly we copy an area of the whole image to a newly allocated
imagebuffer and then hand this over eitehr to this native dll or to an
client application that asks for an image buffer.

As in C++ handing an block of memory from one object to another due to
pointers is realy easy I do not know ho to do this in C#. We still will
have a native driver dll or at least a native COM component that captures
images into some buffer. For performance reasons we also will have some
native C++ dll that does hard image processing. The control of the image
capture and tranfer of image data or part of it between capture and
processing should be handelt by C# objects. What is the best way to handle
this.

Furthermore we have to offer an interface to Display the image buffers or
to provide a client application a handle to the image so that itself can
Display this images. How do I do this in C#. In our current solution we
just and a pointer to the Imagefuffer through C functions to the client so
that it can to a StretchDIBBits or to create a DirectDraw Surface for
Displaying.

We would like to keep a possibility for the client apülication to
visualize Image Buffers or part of them by DirectDraw (fast scrolling ans
Scaling) and offer them also a possibilty to draw into this buffers to
mark certain areas. At this point we first make a copy of the imagebuffer
to MemDC draw into this and then use DirectDraw to get it to the Screen.

So please give a short primer how to handle image data in C#.

Best regards

Thomas

Jan 11 '06 #2
Hi Thomas,
Welcome to MSDN Newsgroup!
please give a short primer how to handle image data in C#.

If you want to handle image in C#, you could refer to the following
articles,
Title: Image Processing Lab in C#
URL: http://www.codeproject.com/cs/media/...essing_Lab.asp

Title: Image Processing for Dummies with C# and GDI
URL:http://www.codeproject.com/cs/media/...cfilters11.asp

I hope the above information is helpful for you. If you have any questions,
please feel free to let me know. Thanks for your understanding!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security

Jan 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Georg Andersson | last post: by
9 posts views Thread by Pierre Tremblay | last post: by
1 post views Thread by Doug Taylor | last post: by
reply views Thread by Sam Durai | last post: by
2 posts views Thread by =?Utf-8?B?RG9u?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.