#NEWLINE# def extract_composite_image( decoded_data ) : #NEWLINE# #INDENT# '\n    Converts a composite (merged) image from the ``decoded_data``\n    to a PIL image.\n    ' #NEWLINE# header = decoded_data . header #NEWLINE# size = ( header . width , header . height ) #NEWLINE# if ( size == ( 0 , 0 ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# channel_ids = _get_header_channel_ids ( header ) #NEWLINE# if ( channel_ids is None ) : #NEWLINE# #INDENT# warnings . warn ( ( 'This number of channels (%d) is unsupported for this color mode (%s)' % ( header . number_of_channels , header . color_mode ) ) ) #NEWLINE# return #NEWLINE# #UNINDENT# return _channel_data_to_PIL ( channel_data = header . image_data , channel_ids = channel_ids , color_mode = header . color_mode , size = size , depth = header . depth , icc_profile = get_icc_profile ( decoded_data ) )