- Implement TranslateBitmapBits.
- Don't pass bogus intent values to lcms.
This commit is contained in:
parent
b486324059
commit
3137566631
|
@ -31,6 +31,7 @@ LCMS_API_FUNCTION(cmsCreate_sRGBProfile)
|
|||
LCMS_API_FUNCTION(cmsCreateMultiprofileTransform)
|
||||
LCMS_API_FUNCTION(cmsCreateTransform)
|
||||
LCMS_API_FUNCTION(cmsDeleteTransform)
|
||||
LCMS_API_FUNCTION(cmsDoTransform)
|
||||
LCMS_API_FUNCTION(cmsOpenProfileFromMem)
|
||||
|
||||
#ifndef LCMS_API_NO_REDEFINE
|
||||
|
@ -39,6 +40,7 @@ LCMS_API_FUNCTION(cmsOpenProfileFromMem)
|
|||
#define cmsCreateMultiprofileTransform pcmsCreateMultiprofileTransform
|
||||
#define cmsCreateTransform pcmsCreateTransform
|
||||
#define cmsDeleteTransform pcmsDeleteTransform
|
||||
#define cmsDoTransform pcmsDoTransform
|
||||
#define cmsOpenProfileFromMem pcmsOpenProfileFromMem
|
||||
#endif /* LCMS_API_NO_REDEFINE */
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ static BOOL MSCMS_init_lcms()
|
|||
LOAD_FUNCPTR(cmsCreateMultiprofileTransform);
|
||||
LOAD_FUNCPTR(cmsCreateTransform);
|
||||
LOAD_FUNCPTR(cmsDeleteTransform);
|
||||
LOAD_FUNCPTR(cmsDoTransform);
|
||||
LOAD_FUNCPTR(cmsOpenProfileFromMem);
|
||||
#undef LOAD_FUNCPTR
|
||||
|
||||
|
|
|
@ -202,18 +202,6 @@ BOOL WINAPI SetColorProfileElementSize( HPROFILE profile, TAGTYPE type, DWORD si
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL WINAPI TranslateBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT input,
|
||||
DWORD width, DWORD height, DWORD inputstride, PVOID destbits,
|
||||
BMFORMAT output, DWORD outputstride, PBMCALLBACKFN callback,
|
||||
ULONG data )
|
||||
{
|
||||
FIXME( "( %p, %p, 0x%08x, 0x%08lx, 0x%08lx, 0x%08lx, %p, 0x%08x, 0x%08lx, %p, 0x%08lx ) stub\n",
|
||||
transform, srcbits, input, width, height, inputstride, destbits, output, outputstride,
|
||||
callback, data );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL WINAPI TranslateColors( HTRANSFORM transform, PCOLOR inputcolors, DWORD number,
|
||||
COLORTYPE input, PCOLOR outputcolors, COLORTYPE output )
|
||||
{
|
||||
|
|
|
@ -62,11 +62,14 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest,
|
|||
#ifdef HAVE_LCMS_H
|
||||
cmsHTRANSFORM cmstransform;
|
||||
cmsHPROFILE cmsprofiles[3];
|
||||
int intent;
|
||||
|
||||
TRACE( "( %p, %p, %p, 0x%08lx )\n", space, dest, target, flags );
|
||||
|
||||
if (!space || !dest) return FALSE;
|
||||
|
||||
intent = space->lcsIntent > 3 ? INTENT_PERCEPTUAL : space->lcsIntent;
|
||||
|
||||
cmsprofiles[0] = cmsCreate_sRGBProfile(); /* FIXME: create from supplied color space */
|
||||
cmsprofiles[1] = MSCMS_hprofile2cmsprofile( dest );
|
||||
|
||||
|
@ -74,14 +77,13 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest,
|
|||
{
|
||||
cmsprofiles[2] = MSCMS_hprofile2cmsprofile( target );
|
||||
cmstransform = cmsCreateMultiprofileTransform( cmsprofiles, 3, TYPE_BGR_8,
|
||||
TYPE_BGR_8, space->lcsIntent, 0 );
|
||||
TYPE_BGR_8, intent, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
cmstransform = cmsCreateTransform( cmsprofiles[0], TYPE_BGR_8, cmsprofiles[1],
|
||||
TYPE_BGR_8, space->lcsIntent, 0 );
|
||||
TYPE_BGR_8, intent, 0 );
|
||||
}
|
||||
|
||||
ret = MSCMS_create_htransform_handle( cmstransform );
|
||||
|
||||
#endif /* HAVE_LCMS_H */
|
||||
|
@ -136,3 +138,24 @@ BOOL WINAPI DeleteColorTransform( HTRANSFORM transform )
|
|||
#endif /* HAVE_LCMS_H */
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL WINAPI TranslateBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT input,
|
||||
DWORD width, DWORD height, DWORD inputstride, PVOID destbits, BMFORMAT output,
|
||||
DWORD outputstride, PBMCALLBACKFN callback, ULONG data )
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
#ifdef HAVE_LCMS_H
|
||||
cmsHTRANSFORM cmstransform;
|
||||
|
||||
TRACE( "( %p, %p, 0x%08x, 0x%08lx, 0x%08lx, 0x%08lx, %p, 0x%08x, 0x%08lx, %p, 0x%08lx )\n",
|
||||
transform, srcbits, input, width, height, inputstride, destbits, output,
|
||||
outputstride, callback, data );
|
||||
|
||||
cmstransform = MSCMS_htransform2cmstransform( transform );
|
||||
|
||||
cmsDoTransform( cmstransform, srcbits, destbits, width * height );
|
||||
ret = TRUE;
|
||||
|
||||
#endif /* HAVE_LCMS_H */
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue