unsigned long *comptilesize=NULL, srcbufsize, jpgbufsize;
tjtransform *t=NULL;
int w=0, h=0, jpegsub=-1, _w, _h, _tilesizex, _tilesizey,
- _numtilesx, _numtilesy;
+ _numtilesx, _numtilesy, _jpegsub;
char *temp=NULL;
int i, j, tilesizex, tilesizey, numtilesx, numtilesy, retval=0;
double start, elapsed;
printf("%-4d %-4d\t", tilesizex, tilesizey);
}
+ _jpegsub=jpegsub;
if(dotile || xformop!=TJXFORM_NONE || xformopt!=0)
{
if((t=(tjtransform *)malloc(sizeof(tjtransform)*numtilesx*numtilesy))
_w=h; _h=w; _tilesizex=tilesizey; _tilesizey=tilesizex;
}
+ if(xformopt&TJXFORM_GRAY) _jpegsub=TJ_GRAYSCALE;
if(xformop==TJXFORM_HFLIP || xformop==TJXFORM_ROT180)
- _w=_w-(_w%tjmcuw[jpegsub]);
+ _w=_w-(_w%tjmcuw[_jpegsub]);
if(xformop==TJXFORM_VFLIP || xformop==TJXFORM_ROT180)
- _h=_h-(_h%tjmcuh[jpegsub]);
+ _h=_h-(_h%tjmcuh[_jpegsub]);
if(xformop==TJXFORM_TRANSVERSE || xformop==TJXFORM_ROT90)
- _w=_w-(_w%tjmcuh[jpegsub]);
+ _w=_w-(_w%tjmcuh[_jpegsub]);
if(xformop==TJXFORM_TRANSVERSE || xformop==TJXFORM_ROT270)
- _h=_h-(_h%tjmcuw[jpegsub]);
+ _h=_h-(_h%tjmcuw[_jpegsub]);
_numtilesx=(_w+_tilesizex-1)/_tilesizex;
_numtilesy=(_h+_tilesizey-1)/_tilesizey;
if(w==tilesizex) _tilesizex=_w;
if(h==tilesizey) _tilesizey=_h;
- if(decomptest(NULL, jpegbuf, comptilesize, NULL, _w, _h, jpegsub, 0,
+ if(decomptest(NULL, jpegbuf, comptilesize, NULL, _w, _h, _jpegsub, 0,
filename, _tilesizex, _tilesizey)==-1)
goto bailout;