We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The behavior of pt is described in README.
pt pass through control [char] (ptss:pass through when size of src-image < dest ptls:pass through when size of src-image > dest n:none default:n)
But the size of src-image is compared with not dest but canvas in real code.
char *pt = (char *)apr_table_get(ctx->prm, "pt"); if (pt[0] == '\0' || strcmp(pt, "ptss") == 0) { if (sz->sw < sz->cw && sz->sh < sz->ch) { pt_flg = 1; } } else if (strcmp(pt, "ptls") == 0) { if (sz->sw > sz->cw || sz->sh > sz->ch) { pt_flg = 1; } }
Though I believe this comparison should be changed like below, what do you think?
--- a/mod_small_light.c +++ b/mod_small_light.c @@ -601,11 +601,11 @@ void small_light_calc_image_size( int pt_flg = 0; char *pt = (char *)apr_table_get(ctx->prm, "pt"); if (pt[0] == '\0' || strcmp(pt, "ptss") == 0) { - if (sz->sw < sz->cw && sz->sh < sz->ch) { + if (sz->sw < sz->dw && sz->sh < sz->dh) { pt_flg = 1; } } else if (strcmp(pt, "ptls") == 0) { - if (sz->sw > sz->cw || sz->sh > sz->ch) { + if (sz->sw > sz->dw || sz->sh > sz->dh) { pt_flg = 1; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The behavior of pt is described in README.
But the size of src-image is compared with not dest but canvas in real code.
Though I believe this comparison should be changed like below, what do you think?
The text was updated successfully, but these errors were encountered: