473,372 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 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 14497
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Georg Andersson | last post by:
hi i'm using a liitle script to insert images in a mssql database. yes i know i'm not supposed to store images in a database, but after my images are only 3kb in size, i've decided to do it...
9
by: Pierre Tremblay | last post by:
Hi! I am trying to display an image in my html document. The document contains the following line: <td class="Input"><img...
8
by: iyuen | last post by:
I'm having problems with converting a byte array to an image object~ My byte array is an picture in VB6 StdPicture format. I've used propertybag to convert the picture into base64Array format in...
1
by: Doug Taylor | last post by:
I'm VERY new to C# and still a bit clumsy with COM. I'm tasked to use C# to design and create an object that can be called from VC6, VB6, and .NET applications (and possibly even from plain old...
0
by: Sam Durai | last post by:
Hello, A particular select query took unusually long time to execute hence I took an app.snap to find out what happens internally and I found out that tablequeue buffers are overflowing on a...
6
by: RaulAbHK | last post by:
Dear all, I guess this is a basic question with an easy answer but I am a beginner and I would much apreciate your feedbacks. Let's say I have a library with some functionality to perform some...
4
by: Muddasir | last post by:
Hi.. i am having a strange problem.......the problem is i am trying to upload a file and to store it in db....when the file got stored in db...it got converted into black and white image and...
2
by: =?Utf-8?B?RG9u?= | last post by:
Hello, I have a image of a building, I want to set the color of each room based on values that come back from a database. How would you do this. Is there a certain image control in asp.net? Or...
5
by: madhav001 | last post by:
Hi, I am biginner in C++ and I tried to combine two memory buffers of TIFF image data to one so that to save it as one image. ie: left half image + right half image = a full image. That was not...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.