* BUG: Fixes splitting images having multiples of 128 as dimensions.

This commit is contained in:
Adrien Prokopowicz 2016-04-02 22:11:31 +02:00
parent b5d41b25d0
commit b5751f38eb

View File

@ -68,10 +68,10 @@ public class PosterImage
cutImages = new BufferedImage[cutImagesCount];
int imageX;
int imageY = (remainderY - HEIGHT) / 2;
int imageY = remainderY == 0 ? 0 :(remainderY - HEIGHT) / 2;
for(int i = 0; i < lines; i++)
{
imageX = (remainderX - WIDTH) / 2;
imageX = remainderX == 0 ? 0 :(remainderX - WIDTH) / 2;
for(int j = 0; j < columns; j++)
{
cutImages[i * columns + j] = makeSubImage(originalImage, imageX, imageY);