Rank: Member
Groups: Member
Joined: 5/21/2006(UTC) Posts: 6
|
Hi I want to apply an ICC profile to an Image, i have tried, but the output is differenct compared to photoshop output. Please let me know if i am doing anything wrong Code: Dim oSource As GraphicsMill.Bitmap
Set oSource = New GraphicsMill.Bitmap
oSource.LoadFromFile "c:\source.jpg"
oSource.Data.ColorManagement.DataProfile = "c:\AdobeRGB1998.icc"
oSource.SaveToFile "c:\output-adobeRGB.jpg"
I have attached the images used in the code. Thanks Kaarthic Edited by user Wednesday, December 19, 2007 4:37:45 PM(UTC)
| Reason: Not specified kaarthic attached the following image(s):
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Hi Kaarthic, First of all, try these updated DLLs. Also, be sure that you use proper color transformation intent (the same as you specify in PhotoShop). Intent is specified using the objBitmap.Data.ColorManagement.Intent property which can be one of the following values: - RenderingIntentGraphic = 1 - Saturation intent.
- RenderingIntentProof = 2 - Relative colorimetric intent.
- RenderingIntentPicture = 4 - Perceptual intent.
- RenderingIntentMatch = 8 - Relative colorimetric intent.
- RenderingIntentProofBPC = 16 - Relative colorimetric intent with black point compensation.
|
|
|
|
Rank: Member
Groups: Member
Joined: 5/21/2006(UTC) Posts: 6
|
Hi I have downloaded the latest DLL as you suggessed, still i am not getting the output similar to Photoshop output fct4356-052.jpg - source image fct4356-052-photoshop-srgb.jpg - sRGB color profile applied in photoshop with Perceptual Intent fct4356-0521-jpg - output image I have tired as Code:Dim oSource As GraphicsMill.Bitmap
Set oSource = New GraphicsMill.Bitmap
oSource.LoadFromFile "C:\SF\Photoshop previews\fct4356-052.jpg"
oSource.Data.ColorManagement.DataProfile = "C:\Leadtools test\sRGB Color Space Profile.icm"
oSource.Data.ColorManagement.Intent = RenderingIntentPicture
oSource.FormatAutoSelect = False
oSource.Formats.SelectCurrent "JPEG"
oSource.Formats.JpegQuality = 100
oSource.SaveToFile "c:\sf\preview\fct4356-0521.jpg"
Help me please, thanks Kaarthic Edited by user Wednesday, December 19, 2007 4:38:06 PM(UTC)
| Reason: Not specified kaarthic attached the following image(s):
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
The code you posted above is analogue to the Assign Profile command in Photoshop, not to the Convert to Profile. To make conversion, you need: - Make sure that input profile (DataProfile) is available. In your case this is a Adobe RGB 1998, and you need not change it.
- Assign output color profile. If you convert to RGB, use RgbProfile. In your case you should assign sRGB profile to it.
- Call ConvertTo24bppRgb method.
Here is a code snippet: Code: Dim oSource As GraphicsMill.Bitmap
Set oSource = New GraphicsMill.Bitmap
oSource.LoadFromFile "C:\[Test Files]\CM\Attachment54.jpg"
oSource.Data.ColorManagement.IsEnabled = True
oSource.Data.ColorManagement.RgbProfile = "T:\ColorConversion\Profiles\sRGB Color Space Profile.icm"
oSource.Data.ColorManagement.Intent = RenderingIntentPicture
oSource.Data.ConvertTo24bppRgb
oSource.FormatAutoSelect = False
oSource.Formats.SelectCurrent "JPEG"
oSource.Formats.JpegQuality = 100
oSource.SaveToFile "c:\[Test Files]\CM\myres.jpg"
I have attached the result image. In my opinion it is quite close to Adobe version. Hope this helps. Edited by user Wednesday, December 19, 2007 4:38:43 PM(UTC)
| Reason: Not specified Andrew attached the following image(s):
|
|
|
|
Rank: Member
Groups: Member
Joined: 11/11/2005(UTC) Posts: 9
|
Should this post be for .net? I can't find any documentation on oSource.Data.ColorManagement.Intent in graphics mill for activex.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
No, this property exists in ActiveX version as well. It was not documented by an oversight.
|
|
|
|
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.