Rank: Member
Groups: Guest
Joined: 1/4/2007(UTC) Posts: 23
|
Hi, I want to apply shadow to a CMYK image and also, want to give a blending option - Multiply (as in Photoshop). How can I acheive it through Aurigma? Thanks
|
|
|
|
Rank: Member
Groups: Guest
Joined: 1/4/2007(UTC) Posts: 23
|
Please let me know if it is acheivable using Aurigma?
|
|
|
|
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, The both of features are available with Graphics Mill for .NET. Here are the code snippets which illustrates how to perform these actions: Draw one image on another using "multiply" combine mode:Code:
Aurigma.GraphicsMill.Bitmap bitmap1 = new Aurigma.GraphicsMill.Bitmap(@"d:/temp/testimages/sourse_image(CMYK).jpg");
Aurigma.GraphicsMill.Bitmap bitmap2 = new Aurigma.GraphicsMill.Bitmap(@"d:/temp/wizard.jpg");
bitmap2.ColorManagement.ConvertToContinuous(Aurigma.GraphicsMill.ColorSpace.Cmyk, false, false);
bitmap2.Draw(bitmap1, 0, 0, 100, 100, Aurigma.GraphicsMill.Transforms.CombineMode.Multiply, 1.0f, Aurigma.GraphicsMill.Transforms.InterpolationMode.MediumQuality);
bitmap1.Save(@"d:/temp/multiply.jpg");
Draw black shadow on CMYK image: Code:Aurigma.GraphicsMill.Bitmap srcBitmap = new Aurigma.GraphicsMill.Bitmap(@"d:/temp/testimages/sourse_image(CMYK).jpg");
srcBitmap.Transforms.Shadow(Aurigma.GraphicsMill.CmykColor.FromCmyk(0, 0, 0, 255), 50, 50);
srcBitmap.Save(@"d:/temp/shadow.tif");
Edited by user 17 years ago
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 1/4/2007(UTC) Posts: 23
|
Hi, This is not what I want.Please understand that I want to create a shadow on the image but the shoadow blending option should be multipy (as in Photoshop).Currently, the shadow is in Normal mode.
|
|
|
|
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, To perform your task you should: 1. Add shadow to your bitmap, 2. Draw shadowed bitmap on result one using "multiply" combine mode, 3. Draw original bitmap on result bitmap with combine mode "alpha". Here is code sample which illustrates this approach: Code:
Aurigma.GraphicsMill.Bitmap srcBitmap = new Aurigma.GraphicsMill.Bitmap(@"d:/images/test/transptest.png");
Aurigma.GraphicsMill.Bitmap shadowBitmap = (Aurigma.GraphicsMill.Bitmap)srcBitmap.Clone();
shadowBitmap.Transforms.Shadow(Aurigma.GraphicsMill.RgbColor.Green, 50, 50, 5, false);
Aurigma.GraphicsMill.Bitmap resultBitmap = new Aurigma.GraphicsMill.Bitmap(Aurigma.GraphicsMill.RgbColor.White,
shadowBitmap.Width, shadowBitmap.Height, shadowBitmap.PixelFormat);
shadowBitmap.Draw(resultBitmap, 0, 0, shadowBitmap.Width, shadowBitmap.Height,
Aurigma.GraphicsMill.Transforms.CombineMode.Multiply, 1.0f,
Aurigma.GraphicsMill.Transforms.InterpolationMode.LowQuality);
srcBitmap.Draw(resultBitmap, 0, 0, srcBitmap.Width, srcBitmap.Height,
Aurigma.GraphicsMill.Transforms.CombineMode.Alpha, 1.0f,
Aurigma.GraphicsMill.Transforms.InterpolationMode.LowQuality);
resultBitmap.Save(@"d:/shadow.png");
Edited by user 17 years ago
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 1/4/2007(UTC) Posts: 23
|
Hi, Thanks for your prompt reply. This is wonderful. Aurigma rocks and so do you.
|
|
|
|
Rank: Member
Groups: Guest
Joined: 1/4/2007(UTC) Posts: 23
|
Hi, I was able to acheive the desired effect in case of png. But how to acheive it when the background is in CMYK format and I want to draw a CMYK image over it with the shadow blended in Multiply mode. Please provide with a code sample to acheive the same.
|
|
|
|
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, Unfortunately "multiply" combine mode is not available for CMYK images. If you really need for this feature, contact us on sales@aurigma.com. Edited by user 17 years ago
| 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.