Skip to content

修复图片没有嵌入单元格的问题 #547

New issue

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kernel/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void url_writer(zend_long row, zend_long columns, xls_resource_write_t *res, zen
*/
void image_writer(zval *value, zend_long row, zend_long columns, double width, double height, xls_resource_write_t *res)
{
lxw_image_options options = {.x_scale = width, .y_scale = height};
lxw_image_options options = {.x_offset = 0, .y_offset = 0, .x_scale = width, .y_scale = height, .object_position = 2};

worksheet_insert_image_opt(res->worksheet, (lxw_row_t)row, (lxw_col_t)columns, ZSTR_VAL(zval_get_string(value)), &options);
}
Expand Down