public NeuQuant ( byte thePic, int len, int sample ) : System | ||
thePic | byte | The image in bytes. |
len | int | The length of the pixels. |
sample | int | Sample interval for the quantitizer. |
return | System |
public NeuQuant(byte[] thePic, int len, int sample)
{
_thepicture = thePic;
_lengthCount = len;
_samplefac = sample;
_network = new int[Netsize][];
for (int i = 0; i < Netsize; i++)
{
_network[i] = new int[4];
_network[i][0] = _network[i][1] = _network[i][2] = (i << (Netbiasshift + 8)) / Netsize;
_freq[i] = IntBias / Netsize; /* 1/netsize */
_bias[i] = 0;
}
}