Home » Archimedes archive » Acorn User » AU 1998-05 A.adf » Regulars » StarInfo/Johns/h/cjpeg

StarInfo/Johns/h/cjpeg

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1998-05 A.adf » Regulars
Filename: StarInfo/Johns/h/cjpeg
Read OK:
File size: 011F bytes
Load address: 0000
Exec address: 0000
File contents
// CompressJPEG
// ------------

typedef struct {
  int  width;
  int  height;
  int  quality;
  int  no8bc;
  int  hdpi;
  int  vdpi;
} CJPEG_params;

int  CJPEG_Start(void *buff,int bufsize,CJPEG_params *params);
void CJPEG_WriteLine(int tag,void *pixels);
int  CJPEG_Finish(int tag);
00000000  2f 2f 20 43 6f 6d 70 72  65 73 73 4a 50 45 47 0a  |// CompressJPEG.|
00000010  2f 2f 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0a  |// ------------.|
00000020  0a 74 79 70 65 64 65 66  20 73 74 72 75 63 74 20  |.typedef struct |
00000030  7b 0a 20 20 69 6e 74 20  20 77 69 64 74 68 3b 0a  |{.  int  width;.|
00000040  20 20 69 6e 74 20 20 68  65 69 67 68 74 3b 0a 20  |  int  height;. |
00000050  20 69 6e 74 20 20 71 75  61 6c 69 74 79 3b 0a 20  | int  quality;. |
00000060  20 69 6e 74 20 20 6e 6f  38 62 63 3b 0a 20 20 69  | int  no8bc;.  i|
00000070  6e 74 20 20 68 64 70 69  3b 0a 20 20 69 6e 74 20  |nt  hdpi;.  int |
00000080  20 76 64 70 69 3b 0a 7d  20 43 4a 50 45 47 5f 70  | vdpi;.} CJPEG_p|
00000090  61 72 61 6d 73 3b 0a 0a  69 6e 74 20 20 43 4a 50  |arams;..int  CJP|
000000a0  45 47 5f 53 74 61 72 74  28 76 6f 69 64 20 2a 62  |EG_Start(void *b|
000000b0  75 66 66 2c 69 6e 74 20  62 75 66 73 69 7a 65 2c  |uff,int bufsize,|
000000c0  43 4a 50 45 47 5f 70 61  72 61 6d 73 20 2a 70 61  |CJPEG_params *pa|
000000d0  72 61 6d 73 29 3b 0a 76  6f 69 64 20 43 4a 50 45  |rams);.void CJPE|
000000e0  47 5f 57 72 69 74 65 4c  69 6e 65 28 69 6e 74 20  |G_WriteLine(int |
000000f0  74 61 67 2c 76 6f 69 64  20 2a 70 69 78 65 6c 73  |tag,void *pixels|
00000100  29 3b 0a 69 6e 74 20 20  43 4a 50 45 47 5f 46 69  |);.int  CJPEG_Fi|
00000110  6e 69 73 68 28 69 6e 74  20 74 61 67 29 3b 0a     |nish(int tag);.|
0000011f