Rank: Member
Groups: Guest
Joined: 6/26/2006(UTC) Posts: 3
|
How can I resize an image in cm preserving the same DPI? I have to calculate the width an height (in pixels) in order to fit the size in cm? I suppose it will exist some more direct transformation to achieve this goal? Thanks in advance, Eduard.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello Eduard, You can specify new width and height of resize transformation in pixels. Here is small code sample: Code:Aurigma.GraphicsMill.Transforms.Resize resize = new Aurigma.GraphicsMill.Transforms.Resize();
resize.Unit = Aurigma.GraphicsMill.Unit.Cm;
resize.Width = 2.0f;
resize.Height = 2.0f;
resize.ResizeMode = Aurigma.GraphicsMill.Transforms.ResizeMode.Fit;
resize.ApplyTransform(bmp);
bmp.Save(@"d:/temp/ResizeInCm.jpg");
This code sample preserves resolution of original bitmap. Edited by user Wednesday, December 19, 2007 2:57:53 PM(UTC)
| Reason: Not specified |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.