We introduce in this paper a new method for smooth foldover-free warping of images. It allows users to specify the constraints in two different ways: positional constraints to constrain the position of points in the image and gradient constraints to constrain the orientation and scaling of some parts of the image. We then show how our method is used for texture mapping with hard constraints. We start with an unconstrained planar embedding of the target mesh calculated with conventional methods. In order to obtain a mapping that satisfies the user-defined constraints, we use our warping method to align the features of the texture image with those of the unconstrained embedding. Compared to previous work, our method generates a smoother texture mapping and offers higher level of control for defining the constraints.