Apply profile to displayed image

Example requests & Code samples for GdPicture Toolkits.
Post Reply
stevem
Posts: 5
Joined: Tue Jun 10, 2008 5:11 pm

Apply profile to displayed image

Post by stevem » Tue Jun 10, 2008 5:24 pm

Hi, I am using the trial software to see if it can help me display images with an ICC profile applied. I am using VB.NET in Visual Studio 2005. I have done the following:

Set a gdPicture control on a form
Set an Imaging control on the same form

To display the image, I do this:

AxImaging1.CreateImageFromFile(sFilename)
lStatus = AxImaging1.ICCAddFromFile("C:\WINDOWS\system32\spool\drivers\color\profile.icm")
AxImaging1.DisplayImageOnHwnd(gdPicture1.hwnd, 0, 0, AxImaging1.GetWidth, AxImaging1.GetHeight)

My question simply is - is this sufficient to apply the profile to the displayed image, or is there something else I need to do? I am using real profiles, but I do not see any visible changes to the displayed image with and without the profile.

stevem
Posts: 5
Joined: Tue Jun 10, 2008 5:11 pm

Re: Apply profile to displayed image

Post by stevem » Wed Jun 11, 2008 12:02 pm

I've also tried using the CreateImageFromFileICM method to load the image into the AxImaging control - no difference.

My question is - is there anything else I need to do between the ICCAddFromFile and the DisplayImageOnHwnd? The help documentation is fairly thin. This might be working fine, but I can't tell from what I'm seeing.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Apply profile to displayed image

Post by Loïc » Fri Jun 13, 2008 11:15 am

Hi,

GdPicture decode each CMYK image to RGB color space in order to symplify editing operations.

In this case if you want to render a CMYK image using a specific color profile you have to do something like this:

Code: Select all

Call Imaging1.ICCAddProfileToFile("cmykimage.tif", "profile.icc")
Imaging1.CreateImageFromFileICM ("cmykimage.tif")
Note that the ICCAddProfileToFile() method are waiting for a CMYK image file.

Best regards,

Loïc

stevem
Posts: 5
Joined: Tue Jun 10, 2008 5:11 pm

Re: Apply profile to displayed image

Post by stevem » Fri Jun 13, 2008 2:49 pm

Thanks for that Loic - but what if my source images are RGB, not CMYK? I'm sure there is a way to convert them, but it's not clear to me how to do that. Sorry if this is a dumb question - this is all very new to me.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Apply profile to displayed image

Post by Loïc » Tue Jun 17, 2008 10:23 am

Hi,

The RGB image -> CMYK image conversion is into our wish list.

I hope we will release this feature soon.

Loïc

stevem
Posts: 5
Joined: Tue Jun 10, 2008 5:11 pm

Re: Apply profile to displayed image

Post by stevem » Tue Jun 17, 2008 11:02 am

Thanks Loic - I'll be watching for that with interest!

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Apply profile to displayed image

Post by Loïc » Thu Jul 31, 2008 2:12 pm

We added a new function to apply a RGB profile to the native image: ICCSetRGBProfile()

https://www.gdpicture.com/guides/gdpicture/v5/gdpictur ... ofile.html

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests