Package org.openstreetmap.josm.tools
Class ImageWarp
java.lang.Object
org.openstreetmap.josm.tools.ImageWarp
Image warping algorithm.
Deforms an image geometrically according to a given transformation formula.
- Since:
- 11858
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWrapper that optimizes a givenImageWarp.PointTransform.static enumInterpolation method.static interfaceTransformation that translates the pixel coordinates. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intgetColor(int x, int y, BufferedImage img, Object sharedArray) private static ObjectgetSharedArray(BufferedImage srcImg) static BufferedImagewarp(BufferedImage srcImg, Dimension targetDim, ImageWarp.PointTransform invTransform, ImageWarp.Interpolation interpolation) Warp an image.
-
Constructor Details
-
ImageWarp
private ImageWarp()
-
-
Method Details
-
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
-