| PLEX86 | ||
|
question about using jpegtran for lossless compression of jpegsI'm curious why you want to do this, as the header takes almost no space and without it a lot of software probably won't recognize the image. I don't know of any existing utility that'll strip the JFIF header, but this should do the trick: * Strip JFIF headers from the JPEG image on stdin, and write the result to stdout. Won't work unmodified on Windows because of the text-binary problem. Not thoroughly tested. * Konqueror questions Historically, I've rarely used Konqueror for web browsing (I'm a die-hard Mozilla person), but I've had occasion to use it... void fail(const char* msg) { fputs(msg, stderr); exit(1); } BFD buttertion fail m68kelfld Hi, what is "BFD buttertion fail" error ? Really strange :(:( I get the following linker error : m68k... void copyrest(FILE* f, FILE* g) { char buf4096; int len; if (fwrite(buf, 1, len, g) != len) fail("write error"); } fail("read error"); } void stripapp0(FILE* f, FILE* g) { int a,b; a = getc(f); b = getc(f); if (a != 0xFF b != 0xD8) fail("not a JPEG file"); putc(a,g); putc(b,g); while (a = getc(f), b = getc(f), a == 0xFF && b == 0xE0) { a = getc(f); b = getc(f); if (a == EOF b == EOF) fail("stop confusing me with weird test cases"); fseek(f, a * 256 + b - 2, SEEKCUR); } if (a != EOF) putc(a,g); if (b != EOF) putc(b,g); copyrest(f,g); } int main() { stripapp0(stdin,stdout); return 0; } -- Ben
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
question about using jpegtran for lossless compression of jpegs |
||||