Hi,
I have an application that generates signatures. It is in JOT format: http://aspn.activestate.com/ASPN/CodeDoc/JOT/JOT/GD.html
How do I write a JavaScript function to convert it into GIF format.
I have been given this C example, but I don't know how to convert it.
Thanks.
void doJot2Gif(PODSObject *podsObj,const char* pBase64Data,const char* pFilename)
{
int len = (int)(strlen(pBase64Data));
if ( len > 0 ) {
// make a copy of the JOT data
unsigned char* ptrBuff = (unsigned char*)malloc(len+1);
memset(ptrBuff,0,len+1);
strcpy((char*)ptrBuff,pBase64Data);
// append the GIF extension to the filename
char gif_filepath[256];
strcpy(gif_filepath,pFilename);
strcat(gif_filepath,".GIF");
HANDLE hFile = FILE_OPEN((char*)gif_filepath);
if (hFile == INVALID_HANDLE_VALUE) {
return;
}
// call the routine that converts the JOT to the GIF and writes the file
jottogif((unsigned char*)ptrBuff, hFile);
free(ptrBuff);
FILE_CLOSE(hFile);
}
}