Link to home
Start Free TrialLog in
Avatar of tedunni
tedunni

asked on

Image Processing without using Temporary Files

From Visual Basic, I currrently call some routines in a C dll that does all of my image processing.  Currently, what I do is I use temporary files, to make this happen.  I pass the PictureBox's handle and the temporary file to the C routine.  The C routine, takes the handle, does some image processing to it, and then writes it out to the temporary file.  In visual basic, I then load the temporary file to the Picture box and then delete the temporary file.  I am wondering if its possible for me to do something similar to this without using a temporary file, as the performance might be better.

Below is a synopsis of what what I do:
In VB:

Dim tempRawFile As String
tempRawFile = GetTempFileName()
DLLFile.C_Routine Picture1.Handle, tempRawFile
Picture1 = LoadPicture(tempRawFile)
DeleteFile(tempRawFile)

In C this is what I do:
int CALLINGCONV C_Routine(HBITMAP fromHBMP,char *rawFileName) {

// I do something to fromHBMP then I write it out to rawFileName
// I then return OK
}

ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial