‎06-17-2005 12:43 PM
‎06-20-2005 10:15 PM
‎06-20-2005 11:15 PM
@cural wrote:
I want to save a bitmap on my hard disk with MSVC. I just saw on the web site that I should use imgSessionSaveBufferEx but there is no informations and examples of it. I tried:
imgSessionSaveBufferEx (Sid, (void *)ImaqBuffer, "test");
It doing nothing, where is my image?
Thank you.
‎08-09-2007 12:03 PM
Hi everyone,
I have got a big problem, by using the memory allocation function call malloc(), i have been able to store in the allocated address. But when i load from the allocated memory address, it loads only last image not from the begining in sequence. Could you tell me what is the problem. here is the code. These are the sample that i have been trying to use.
void
ImaqThread(LPDWORD lpdwParam,char *alloc){
long n=0,m; long j=0; int i=0,l=1264,k=0; char *mac; char *buf; char *b[3]; char buffer[32]; char filename[17]; //char file[17]; static int t1, t2; static int nbFrame = 0, error; // Create a pointer to the stop boolean. This needs to be // volatile because the value can change at any time.BOOL*
volatile stop = (BOOL*)lpdwParam;alloc = (
char*)malloc(sizeof(char)); if (alloc==NULL){
exit (1);
}
while(!*stop && !error){
t2 = GetTickCount();
// Get the frame after tne next Vertical BlankerrChk(imgGrab (Sid, &ImaqBuffer, TRUE));
*alloc=ImaqBuffer;
alloc[1]=
'\0';k++;
alloc=alloc+2;
if (k==2){
alloc=alloc-2;
loop:
*ImaqBuffer=alloc;
sprintf (filename,
"c:\\tmp\\%4.4d.bmp", j);j++;
imgSessionSaveBufferEx(Sid,(
void *) ImaqBuffer,filename);alloc[0]=
"0"; //free(alloc);alloc=alloc-2;
goto loop;}
}
Error:
if(error<0 && !*stop){
DisplayIMAQError(error);
PostMessage(ImaqSmplHwnd, WM_COMMAND, PB_STOP, 0);
}
return 0;}