mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
pictureviewer: fix build with gcc7
This commit is contained in:
committed by
Jacek Jendrzej
parent
971f3703a6
commit
125eb6a7d1
@@ -173,7 +173,7 @@ int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* /*yp*/)
|
||||
struct jpeg_decompress_struct *ciptr;
|
||||
struct r_crw_jpeg_error_mgr emgr;
|
||||
unsigned char *bp;
|
||||
int px/*,py*/,c,x=*xp;
|
||||
int px/*,py*/,c,x=*xp, ix;
|
||||
FILE *fh;
|
||||
JSAMPLE *lb;
|
||||
|
||||
@@ -195,21 +195,22 @@ int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* /*yp*/)
|
||||
jpeg_stdio_src(ciptr,fh);
|
||||
jpeg_read_header(ciptr,TRUE);
|
||||
ciptr->out_color_space=JCS_RGB;
|
||||
if(x==(int)ciptr->image_width)
|
||||
ix = (int)ciptr->image_width;
|
||||
if (x == ix)
|
||||
ciptr->scale_denom=1;
|
||||
#if __cplusplus < 201103
|
||||
else if(abs(x*2 - ciptr->image_width) < 2)
|
||||
else if (abs(x*2 - ix) < 2)
|
||||
ciptr->scale_denom=2;
|
||||
else if(abs(x*4 - ciptr->image_width) < 4)
|
||||
else if (abs(x*4 - ix) < 4)
|
||||
ciptr->scale_denom=4;
|
||||
else if(abs(x*8 - ciptr->image_width) < 8)
|
||||
else if (abs(x*8 - ix) < 8)
|
||||
ciptr->scale_denom=8;
|
||||
#else
|
||||
else if(std::abs(x*2 - ciptr->image_width) < 2)
|
||||
else if (std::abs(x*2 - ix) < 2)
|
||||
ciptr->scale_denom=2;
|
||||
else if(std::abs(x*4 - ciptr->image_width) < 4)
|
||||
else if (std::abs(x*4 - ix) < 4)
|
||||
ciptr->scale_denom=4;
|
||||
else if(std::abs(x*8 - ciptr->image_width) < 8)
|
||||
else if (std::abs(x*8 - ix) < 8)
|
||||
ciptr->scale_denom=8;
|
||||
#endif
|
||||
else
|
||||
|
@@ -72,7 +72,7 @@ int fh_jpeg_load(const char *filename,unsigned char **buffer,int* x,int* y)
|
||||
struct jpeg_decompress_struct *ciptr;
|
||||
struct r_jpeg_error_mgr emgr;
|
||||
unsigned char *bp;
|
||||
int px,py,c;
|
||||
int px,py,c, ix;
|
||||
FILE *fh;
|
||||
JSAMPLE *lb;
|
||||
|
||||
@@ -94,21 +94,22 @@ int fh_jpeg_load(const char *filename,unsigned char **buffer,int* x,int* y)
|
||||
jpeg_read_header(ciptr,TRUE);
|
||||
ciptr->out_color_space=JCS_RGB;
|
||||
ciptr->dct_method=JDCT_FASTEST;
|
||||
if(*x==(int)ciptr->image_width)
|
||||
ix = (int)ciptr->image_width;
|
||||
if(*x == ix)
|
||||
ciptr->scale_denom=1;
|
||||
#if __cplusplus < 201103
|
||||
else if(abs(*x*2 - ciptr->image_width) < 2)
|
||||
else if (abs(*x*2 - ix) < 2)
|
||||
ciptr->scale_denom=2;
|
||||
else if(abs(*x*4 - ciptr->image_width) < 4)
|
||||
else if (abs(*x*4 - ix) < 4)
|
||||
ciptr->scale_denom=4;
|
||||
else if(abs(*x*8 - ciptr->image_width) < 8)
|
||||
else if (abs(*x*8 - ix) < 8)
|
||||
ciptr->scale_denom=8;
|
||||
#else
|
||||
else if(std::abs(*x*2 - ciptr->image_width) < 2)
|
||||
else if (std::abs(*x*2 - ix) < 2)
|
||||
ciptr->scale_denom=2;
|
||||
else if(std::abs(*x*4 - ciptr->image_width) < 4)
|
||||
else if (std::abs(*x*4 - ix) < 4)
|
||||
ciptr->scale_denom=4;
|
||||
else if(std::abs(*x*8 - ciptr->image_width) < 8)
|
||||
else if (std::abs(*x*8 - ix) < 8)
|
||||
ciptr->scale_denom=8;
|
||||
#endif
|
||||
else
|
||||
|
Reference in New Issue
Block a user