Hello,
I want to create a gif-file. I get hex-code from a webservice which I need to convert to a file.
The response from the webservice is for example "474946383961de00de00f00" which I need to write to a .gif file.
When I try the following example, it doesn't return the "00", so when I open the file in an hexeditor I still get "474946383961dedef0".
How can I do that?
static void Job00001(Args _args)
{
AsciiIO asciiFile;
int i;
#file
container c;
;
c = "47";
c = "49";
c = "46";
c = "38";
c = "39";
c = "61";
c = "de";
c = "00";
c = "de";
c = "00";
c = "f0";
c = "00";
c = "00";
c = "00";
c = "00";
c = "00";
c = "00";
c = "ff";
c = "ff";
c = "ff";
c = "2c";
asciiFile = new asciiIo(@"C:\temp\file.gif", #io_write);
for (i=1; i<=conlen(c); i =1)
{
asciiFile.writeChar(hex2int(conpeek(c, i)));
}
info("END");
}