L.D wrote:
>There's got to be another way.  The current jpg to BMP conversion is the
>single most guilty thing when it comes to slow speeds in Arachne.

Yes, but with the 32-bit version it's atleast faster than before.

>To
>also be stuck with gif to BMP would be horrid!

I agree.

>Now, I may be way off base, but isn't the internal designation of
>graphics files set at a specific place in those files?  X number of
>characters in from file start or whatever?  And isn't it possible to
>"read" a string from another file if you have an "address" for that
>string?  And whenever you can read a string you can then set a variable
>value, right?  

True, I actually made a working program out of the code I recently sent:

#include <stdio.h>

int is_it_a_jpeg_or_a_gif(FILE *file)
{
 char buf[10];

 fread(buf, 1, 10, file);
 if(buf[6] == 'J' && buf[7] == 'F' && buf[8] == 'I' && buf[9] == 'F')
  return 1;
 if(strncmp(buf, "GIF8", 4) == 0)
  return 2;
 return 3;
}

int main(int argc, char *argv[])
{
 FILE *file = fopen(argv[1], "rb");
 return is_it_a_jpeg_or_a_gif(file);
}

>So if all the foregoing is true, why can't a simple "stand alone" 
>program be written with a decision tree be made that says something like 
>if %string%==G rename file.* file.gif else if %string%==J rename file.* 
>file.jpg  etc etc etc?

Be my guest, but I could not get it to work (off-line). The above program
does return a value which we can check in some "if errorlevel" statments
but we can not get Arachne to act upon it. To get that to work we must the
above function inside of Arachne.
If you don't have a C compiler I'll send you the compiled version if you
want to try - who knows perhaps I made a misstake?

>Would that produce that much bloatware?

Not if we check before no, the way I interpreted the original idea was that
it would do it after calling the diffrent programs (and your idea is in the
middle).
Still it will require a check of every image that is sent to the user and
this might very well decrease speed if many images are downloaded and it's
a slow computer.

>Am I being too simplistic here?  Would this take a pile of code to do? 

The control part is as you can see very easy - now how much Michael might
need to add to implement it inside core.exe I don't know. (He needs to
ignore what the server says that it is).

>If it could be done, then everything else in Arachne could remain
>untouched, right?

Yes, and of course everything can be done - the question is if we have the
knowledge, time and dessire to do it.
But if some server sends HTML files as plain/text (instead of plain/html) -
shouldn't we add the capability to Arachne to notice such failures as well?
What we would end up getting would be bloatware since every downloaded file
would needed to be checked before being proccessed.

Reply via email to