Package games.stendhal.tools.map
Class ImageSplit
java.lang.Object
games.stendhal.tools.map.ImageSplit
splits an image
- Author:
- hendrik
-
Constructor Summary
ConstructorDescriptionImageSplit(String imageFilename, String targetFolder, String prefix, int tileSizeSource, int tileSizeTarget, int offsetX, int offsetY, int cutOff)
creates a new ImageSplit -
Method Summary
Modifier and TypeMethodDescriptionstatic int
divRoundingUp(int i, int j)
an integer division which rounds upstatic void
entrance pointvoid
split()
splits the large image into smaller ones
-
Constructor Details
-
ImageSplit
public ImageSplit(String imageFilename, String targetFolder, String prefix, int tileSizeSource, int tileSizeTarget, int offsetX, int offsetY, int cutOff)creates a new ImageSplit- Parameters:
imageFilename
- image to splittargetFolder
- target folder to store the split image ilfesprefix
- prefix for file names e.g. zoom leveltileSizeTarget
- size in px for the target filesoffsetX
- offset for the x-coordinate in the target filenamesoffsetY
- offset for the y-coordinate in the target filenamescutOff
- number of pixels to cut of at each side of the original image
-
-
Method Details
-
split
splits the large image into smaller ones- Throws:
IOException
-
divRoundingUp
public static int divRoundingUp(int i, int j)an integer division which rounds up- Parameters:
i
- number to dividej
- number to divide by- Returns:
- result
-
main
entrance point- Parameters:
args
- command line arguments.- Throws:
IOException
-