Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

« [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
02 10 15 - 11:22
No comments

  
Remember personal info?

Emoticons / Textile


Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.