def get_icc_profile(decoded_data):
    # fixme: move this function somewhere?
    icc_profiles = [res.data for res in decoded_data.image_resource_blocks
                   if res.resource_id == ImageResourceID.ICC_PROFILE]

    if not icc_profiles:
        return None

    icc_profile = icc_profiles[0]

    if isinstance(icc_profile, bytes): # profile was not decoded
        return None

    return icc_profile
Initializes a new instance of the class.
dataset/ETHPy150Open psd-tools/psd-tools/src/psd_tools/user_api/pil_support.py/get_icc_profile--crossover with--dataset/ETHPy150Open Microsoft/ApplicationInsights-Python/applicationinsights/channel/AsynchronousQueue.py/AsynchronousQueue.__init__