Closed trikko closed 11 years ago
crop retains the size virtual canvas or page, and sets the offset of the image in this virtual canvas.
You may want to use Image.excerpt for what you are trying to do.
You're right, but I have same problem with rotate, for example. I move image layer outside canvas... Why rotate doesn't enlarge inage canvas size?
When i try rotating an image the canvas does get resized, but it does set an offset for the image. Is that also the case for you? if so you can try resetting the page offset:
img.page = Geometry(img.columns, img.rows, 0, 0);
the with and height seem to be ignored for an png so they could be 0 also.
Ok, that's fine :+1:
import dmagick.Image; import dmagick.Geometry;
void main(string[] s) { Image i = new Image("/tmp/300.png");
}
dmd 2.061 dmagick from trunk. Ubuntu 12.10.
Try to open "cropped" image with gimp, it explains you the problem.