tile_info.height=height;
if (tile_info.height == 0)
tile_info.height=image->rows >> 3;
- tile_info.x=(ssize_t) tile_info.width-(image->columns % tile_info.width);
- tile_info.y=(ssize_t) tile_info.height-(image->rows % tile_info.height);
+ tile_info.x=0;
+ if ((image->columns % tile_info.width) != 0)
+ tile_info.x=(ssize_t) tile_info.width-(image->columns % tile_info.width);
+ tile_info.y=0;
+ if ((image->rows % tile_info.height) != 0)
+ tile_info.y=(ssize_t) tile_info.height-(image->rows % tile_info.height);
clahe_info.width=image->columns+tile_info.x;
clahe_info.height=image->rows+tile_info.y;
clahe_info.x=(ssize_t) clahe_info.width/tile_info.width;