Skip to main content
Inspiring
October 3, 2023
Answered

How to get the whole image with SmartRender

  • October 3, 2023
  • 1 reply
  • 213 views

I am developing a plugin using SmartRender.
I have applied the plugin under development to a 1920*1080 image with a 960*540 composition.
When using 'checkout_layer_pixels' to get 'PF_EffectWorld', I was provided an image of 1154*650 and could not get the entire image.
Is there any way to get the entire image applied?
Also, this problem can be solved by setting the size of the composition to 1920*1080 and I believe the problem is related to the size of the composition.

 

This topic has been closed for replies.
Correct answer YuK1_Works

Resolved.

PF_LRect full = {0, 0, in_data->width, in_data->height};
UnionLRect(&full, &req.rect);

PF_CheckoutResult input;
ERR(extra->cb->checkout_layer(in_data->effect_ref, 0, 0, &req,
                                  in_data->current_time, in_data->time_step,
                                  in_data->time_scale, &input));

By writing the above, the maximum resolution could be obtained according to in_data->width, in_data->height.

1 reply

YuK1_WorksAuthorCorrect answer
Inspiring
October 5, 2023

Resolved.

PF_LRect full = {0, 0, in_data->width, in_data->height};
UnionLRect(&full, &req.rect);

PF_CheckoutResult input;
ERR(extra->cb->checkout_layer(in_data->effect_ref, 0, 0, &req,
                                  in_data->current_time, in_data->time_step,
                                  in_data->time_scale, &input));

By writing the above, the maximum resolution could be obtained according to in_data->width, in_data->height.