Rank: Newbie
Groups: Guest
Joined: 11/25/2010(UTC) Posts: 6
Thanks: 1 times
|
Below is an example of a picture I've run through Graphics Mill As you can see the picture on the left is not quite as nicely as the right picture. Can I do anything about it? I have used the following code to create the image Code:
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap();
GlobalSettings.MultiProcessorSupport = true;
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;
PsdReader PSD = new PsdReader(@"C:\test.psd");
IFrame PSDFrame = PSD.LoadFrame(0);
PSDFrame.GetBitmap(bitmap);
bitmap.Transforms.Resize(144, 100, Aurigma.GraphicsMill.Transforms.ResizeMode.Shrink, Aurigma.GraphicsMill.Transforms.InterpolationMode.Anisotropic9);
bitmap.HorizontalResolution = 72;
bitmap.VerticalResolution = 72;
bitmap.ColorManagement.RgbColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb();
bitmap.ColorManagement.ConvertToContinuous(Aurigma.GraphicsMill.ColorSpace.Rgb, bitmap.HasAlpha, bitmap.IsExtended);
bitmap.Save(@"C:\test.bmp");
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello,
Could you please provide me with a sample of PSD file? I need to test it. |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 11/25/2010(UTC) Posts: 6
Thanks: 1 times
|
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello Nikolai, Thanks for your image. You use image with transparent background. To save it with antialiasing, you will need to use PNG format, which support transparency. In this case, you can use your code you listed above. In case you need BMP format only, which does not support transparency, you should place your image on the white bitmap. We re-made your code snippet a bit. It allows converting PSD to BMP with antialiasing. Here is the code: Code:Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap();
GlobalSettings.MultiProcessorSupport = true;
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;
PsdReader PSD = new PsdReader(@"C:\test.psd");
IFrame PSDFrame = PSD.LoadFrame(0);
PSDFrame.GetBitmap(bitmap);
bitmap.Transforms.Resize(144, 100, Aurigma.GraphicsMill.Transforms.ResizeMode.Shrink, Aurigma.GraphicsMill.Transforms.InterpolationMode.Lanczos3Filter);
bitmap.HorizontalResolution = 72;
bitmap.VerticalResolution = 72;
bitmap.ColorManagement.RgbColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb();
bitmap.ColorManagement.ConvertToContinuous(Aurigma.GraphicsMill.ColorSpace.Rgb, bitmap.HasAlpha, false);
Aurigma.GraphicsMill.Bitmap blendedBmp = new Aurigma.GraphicsMill.Bitmap(Aurigma.GraphicsMill.RgbColor.White, bitmap.Width, bitmap.Height, PixelFormat.Format24bppRgb);
bitmap.Draw(blendedBmp, 0, 0, Aurigma.GraphicsMill.Transforms.CombineMode.Alpha);
blendedBmp.Save(@"C:\test.bmp");
You will find test.bmp file we got using this script. If you have any additional questions or problems, please feel free to let me know. Edited by user Friday, November 26, 2010 5:40:38 AM(UTC)
| Reason: Not specified Dmitry.Obukhov attached the following image(s): |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
1 user thanked Dmitry.Obukhov for this useful post.
|
|
|
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.