« [ANN] MonkeyBread Sof… | Home | Big Bundle Offer for … »

Tip of day: Load ICC profile on OS X for any image format with CGImageSource

With this sample code we use CGImageSource and Apple's support for 20+ image formats to read ICC Profile for any supported image file format:

// get a picture file dim file as FolderItem = SpecialFolder.Desktop.Child("sylwia.jpg") // get image source dim source as new CGImageSourceMBS(file) // read image dim image as CGImageMBS = source.CreateImageAtIndex(0) // get Color space from image dim profile as CGColorSpaceMBS = image.ColorSpace // get ICC profile data dim ICCProfile as string = profile.ICCProfile // and parse it with LCMS and show name dim LCMSProfile as LCMS2ProfileMBS = LCMS2ProfileMBS.OpenProfileFromString(ICCProfile) MsgBox LCMSProfile.Name
The biggest plugin in space...
02 10 15 - 11:22