us.zuercher.gpx2map.image.netpbm
Class NetpbmStitcher
java.lang.Object
us.zuercher.gpx2map.image.netpbm.NetpbmStitcher
public class NetpbmStitcher
- extends Object
NetpbmStitcher concatenates NetpbmImage
files horizontally and
vertically to produce a single larger image.
- Author:
- Stephan Zuercher
Constructor Summary |
NetpbmStitcher(List<List<File>> tileFiles,
boolean gzipped)
Constructs a new NetpbmStitcher for the given files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tileImages
private final List<List<NetpbmImage>> tileImages
- List of Lists of
NetpbmImage
objects. Each member of
tileImages is a row in the final image.
NetpbmStitcher
public NetpbmStitcher(List<List<File>> tileFiles,
boolean gzipped)
throws IOException
- Constructs a new NetpbmStitcher for the given files. Each element of
tileFiles
is a List<File> that represents a
horizontal stripe of the output image. All NetpbmImage
objects
provided must be for files of the same horizontal and vertical
dimensions. This constructor copies the data in tileFiles
.
Modifications made to the list after calling the constructor will
have no effect.
Although this method accepts PAM-format images, it ignores the
image's transparency, if any.
- Parameters:
tileFiles
- NetpbmImage files used to build the output imagegzipped
- indicates whether the NetpbmImage objects are compressed
- Throws:
IOException
- if a Netpbm image file cannot be opened
execute
public void execute(File outputFile,
ProgressMeter meter)
throws IOException
- Perform the stitching. Output is written to
outputFile
,
using meter
to indicate progress.
- Parameters:
outputFile
- target image filemeter
- progress meteer
- Throws:
IOException
- if there's an error reading or writing
IllegalStateException
- if the input NetpbmImages are not all
of equal size