Package org.openstreetmap.josm.tools
Class ImageWarp
- java.lang.Object
-
- org.openstreetmap.josm.tools.ImageWarp
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImageWarp.GridTransform
Wrapper that optimizes a givenImageWarp.PointTransform
.static class
ImageWarp.Interpolation
Interpolation method.static interface
ImageWarp.PointTransform
Transformation that translates the pixel coordinates.
-
Constructor Summary
Constructors Modifier Constructor Description private
ImageWarp()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static int
getColor(int x, int y, BufferedImage img)
static BufferedImage
warp(BufferedImage srcImg, Dimension targetDim, ImageWarp.PointTransform invTransform, ImageWarp.Interpolation interpolation)
Warp an image.
-
-
-
Constructor Detail
-
ImageWarp
private ImageWarp()
-
-
Method Detail
-
warp
public static BufferedImage warp(BufferedImage srcImg, Dimension targetDim, ImageWarp.PointTransform invTransform, ImageWarp.Interpolation interpolation)
Warp an image.- Parameters:
srcImg
- the original imagetargetDim
- dimension of the target imageinvTransform
- inverse transformation (translates pixel coordinates of the target image to pixel coordinates of the original image)interpolation
- the interpolation method- Returns:
- the warped image
-
getColor
private static int getColor(int x, int y, BufferedImage img)
-
-