mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-10-05 01:37:30 +02:00
* BUG: Splitting images having dimensions that are multiples of 128
now works correctly.
This commit is contained in:
parent
f7d9a07a58
commit
a5d0193736
@ -43,10 +43,10 @@ public class PosterImage
|
|||||||
cutImages = new BufferedImage[cutImagesCount];
|
cutImages = new BufferedImage[cutImagesCount];
|
||||||
|
|
||||||
int imageX;
|
int imageX;
|
||||||
int imageY = (remainderY - ImageMap.HEIGHT) / 2;
|
int imageY = (remainderY > 0) ? (remainderY - ImageMap.HEIGHT) / 2 : 0;
|
||||||
for(int i = 0; i < lines; i++)
|
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++)
|
for(int j = 0; j < columns; j++)
|
||||||
{
|
{
|
||||||
cutImages[i * columns + j] = makeSubImage(originalImage, imageX, imageY);
|
cutImages[i * columns + j] = makeSubImage(originalImage, imageX, imageY);
|
||||||
|
Loading…
Reference in New Issue
Block a user