< prev index next >

src/java.desktop/share/native/liblcms/cmscnvrt.c

Print this page




 668 
 669            if (ColorSpaceOut == cmsSigGrayData ||
 670                   ColorSpaceOut == cmsSigRgbData ||
 671                   ColorSpaceOut == cmsSigCmykData) {
 672 
 673                   cmsStage* clip = _cmsStageClipNegatives(Result->ContextID, cmsChannelsOf(ColorSpaceOut));
 674                   if (clip == NULL) goto Error;
 675 
 676                   if (!cmsPipelineInsertStage(Result, cmsAT_END, clip))
 677                          goto Error;
 678            }
 679 
 680     }
 681 
 682     return Result;
 683 
 684 Error:
 685 
 686     if (Lut != NULL) cmsPipelineFree(Lut);
 687     if (Result != NULL) cmsPipelineFree(Result);

 688     return NULL;
 689 
 690     cmsUNUSED_PARAMETER(dwFlags);
 691 }
 692 
 693 
 694 // Wrapper for DLL calling convention
 695 cmsPipeline*  CMSEXPORT _cmsDefaultICCintents(cmsContext     ContextID,
 696                                               cmsUInt32Number nProfiles,
 697                                               cmsUInt32Number TheIntents[],
 698                                               cmsHPROFILE     hProfiles[],
 699                                               cmsBool         BPC[],
 700                                               cmsFloat64Number AdaptationStates[],
 701                                               cmsUInt32Number dwFlags)
 702 {
 703     return DefaultICCintents(ContextID, nProfiles, TheIntents, hProfiles, BPC, AdaptationStates, dwFlags);
 704 }
 705 
 706 // Black preserving intents ---------------------------------------------------------------------------------------------
 707 
 708 // Translate black-preserving intents to ICC ones
 709 static
 710 int TranslateNonICCIntents(int Intent)




 668 
 669            if (ColorSpaceOut == cmsSigGrayData ||
 670                   ColorSpaceOut == cmsSigRgbData ||
 671                   ColorSpaceOut == cmsSigCmykData) {
 672 
 673                   cmsStage* clip = _cmsStageClipNegatives(Result->ContextID, cmsChannelsOf(ColorSpaceOut));
 674                   if (clip == NULL) goto Error;
 675 
 676                   if (!cmsPipelineInsertStage(Result, cmsAT_END, clip))
 677                          goto Error;
 678            }
 679 
 680     }
 681 
 682     return Result;
 683 
 684 Error:
 685 
 686     if (Lut != NULL) cmsPipelineFree(Lut);
 687     if (Result != NULL) cmsPipelineFree(Result);
 688     cmsUNUSED_PARAMETER(dwFlags);
 689     return NULL;
 690 

 691 }
 692 
 693 
 694 // Wrapper for DLL calling convention
 695 cmsPipeline*  CMSEXPORT _cmsDefaultICCintents(cmsContext     ContextID,
 696                                               cmsUInt32Number nProfiles,
 697                                               cmsUInt32Number TheIntents[],
 698                                               cmsHPROFILE     hProfiles[],
 699                                               cmsBool         BPC[],
 700                                               cmsFloat64Number AdaptationStates[],
 701                                               cmsUInt32Number dwFlags)
 702 {
 703     return DefaultICCintents(ContextID, nProfiles, TheIntents, hProfiles, BPC, AdaptationStates, dwFlags);
 704 }
 705 
 706 // Black preserving intents ---------------------------------------------------------------------------------------------
 707 
 708 // Translate black-preserving intents to ICC ones
 709 static
 710 int TranslateNonICCIntents(int Intent)


< prev index next >