DLLEXPORT int tj3Get()

in turbojpeg.c [803:862]


DLLEXPORT int tj3Get(tjhandle handle, int param)
{
  tjinstance *this = (tjinstance *)handle;
  if (!this) return -1;

  switch (param) {
  case TJPARAM_STOPONWARNING:
    return this->jerr.stopOnWarning;
  case TJPARAM_BOTTOMUP:
    return this->bottomUp;
  case TJPARAM_NOREALLOC:
    return this->noRealloc;
  case TJPARAM_QUALITY:
    return this->quality;
  case TJPARAM_SUBSAMP:
    return this->subsamp;
  case TJPARAM_JPEGWIDTH:
    return this->jpegWidth;
  case TJPARAM_JPEGHEIGHT:
    return this->jpegHeight;
  case TJPARAM_PRECISION:
    return this->precision;
  case TJPARAM_COLORSPACE:
    return this->colorspace;
  case TJPARAM_FASTUPSAMPLE:
    return this->fastUpsample;
  case TJPARAM_FASTDCT:
    return this->fastDCT;
  case TJPARAM_OPTIMIZE:
    return this->optimize;
  case TJPARAM_PROGRESSIVE:
    return this->progressive;
  case TJPARAM_SCANLIMIT:
    return this->scanLimit;
  case TJPARAM_ARITHMETIC:
    return this->arithmetic;
  case TJPARAM_LOSSLESS:
    return this->lossless;
  case TJPARAM_LOSSLESSPSV:
    return this->losslessPSV;
  case TJPARAM_LOSSLESSPT:
    return this->losslessPt;
  case TJPARAM_RESTARTBLOCKS:
    return this->restartIntervalBlocks;
  case TJPARAM_RESTARTROWS:
    return this->restartIntervalRows;
  case TJPARAM_XDENSITY:
    return this->xDensity;
  case TJPARAM_YDENSITY:
    return this->yDensity;
  case TJPARAM_DENSITYUNITS:
    return this->densityUnits;
  case TJPARAM_MAXMEMORY:
    return this->maxMemory;
  case TJPARAM_MAXPIXELS:
    return this->maxPixels;
  }

  return -1;
}