* BUG: Splitting images having dimensions that are multiples of 128

now works correctly.
This commit is contained in:
Prokopyl 2015-03-03 11:24:18 +01:00
parent f7d9a07a58
commit a5d0193736

View File

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