WorldTransformSuite1()->transform_world purple alpha

Community Beginner ,
Mar 03, 2022 Mar 03, 2022

Copy link to clipboard

Copied

I am trying to recreate the default transform effect. 

First, I implemented rotation, but the areas that should be transparent are translucent purple. Do you see what is happening?

 

I use SmartFX

	PF_FloatMatrix mat;
	const double ratio = (double)in_data->downsample_x.num / (double)in_data->downsample_x.den;
	PF_FpLong radiansF = PF_RAD_PER_DEGREE * FIX_2_FLOAT(params[CircleSlicer_ANGLE]->u.ad.value);
	PF_FpLong sF = suites.ANSICallbacksSuite1()->sin(radiansF);
	PF_FpLong cF = suites.ANSICallbacksSuite1()->cos(radiansF);
	PF_FpLong aboutXF = in_data->width / 2 * ratio;
	PF_FpLong aboutYF = in_data->height / 2 * ratio;

	
	mat.mat[0][0] = cF;
	mat.mat[0][1] = sF;
	mat.mat[0][2] = 0.0;
	mat.mat[1][0] = -sF;
	mat.mat[1][1] = cF;
	mat.mat[1][2] = 0.0;
	mat.mat[2][0] = (aboutXF * (1.0 - cF) + aboutYF * sF);
	mat.mat[2][1] = (aboutYF * (1.0 - cF) - aboutXF * sF);
	mat.mat[2][2] = 1;

	err = suites.WorldTransformSuite1()->transform_world(in_data->effect_ref, PF_Quality_HI, PF_MF_Alpha_STRAIGHT,
		in_data->field, input, &mode, NULL, &mat, 1, true, &input->extent_hint, output);

 

purple.png

TOPICS
How to , SDK

Views

72

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 03, 2022 Mar 03, 2022

Copy link to clipboard

Copied

Hi in_the_sky,

 

That looks a bit like uninitialized memory. Have you tried clearing the output before writing to it? PF_FillMatteSuite2 is available for this.

 

Cheers,

Jason

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 08, 2022 Mar 08, 2022

Copy link to clipboard

Copied

LATEST

Thank you! I solved it.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines