I am using image_style_create_derivative
to create image styles on fly. Before that I am using image_style_path which creates style path.
$derivative_uri = image_style_path([style_name], [source]);
image_style_create_derivative([style_name], [source], $derivative_uri)
It generates image. Which is fine. But it is generating image with original size. Not with the size of style_name.
For example if style name is thumbnail, the generated image style size should be 160x100.
How can I achieve it?