Skip to content

Commit

Permalink
Merge pull request #25 from rok4/fix/tiff-tile-widthwise
Browse files Browse the repository at this point in the history
Correction du calcul de nombre de tuile dans un TIFF
  • Loading branch information
Dolite authored Oct 2, 2023
2 parents 961dc2e + bdf0c59 commit d382016
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/image/file/LibtiffImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,11 @@ int LibtiffImage::_getline ( T* buffer, int line ) {
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tile_width);
TIFFGetField(tif, TIFFTAG_TILELENGTH, &tile_height);

int tilenumber_widthwise = width / tile_width + 1;
int tilenumber_widthwise = width / tile_width;
if (width % tile_width != 0) {
// On ajoute la tuile incomplète
tilenumber_widthwise++;
}

int tile_size = tile_width * tile_height * pixelSize;
int tile_row_size = tile_width * pixelSize;
Expand Down

0 comments on commit d382016

Please sign in to comment.