Skip to content
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

Add new function SetSheetBackgroundFromBytes used for setting background image by given image data #1405

Closed
jianxinhou opened this issue Nov 28, 2022 · 2 comments · Fixed by #1406

Comments

@jianxinhou
Copy link
Contributor

Because of business need, I want to add a new method(SetSheetBackgroundFromBytes) for struct File.

the function of this method is similar with existing method(SetSheetBackground), they both can add background image for excel files, but the difference between SetSheetBackground and SetSheetBackgroundFromBytes is, the new method use binary image data as image source. And SetSheetBackgroundFromBytes do not need to specify the extension of image data, It can determine the image format by itself.

由于业务需要,我想为File结构体增加一个新的方法:SetSheetBackgroundFromBytes。

该方法的功能与现存SetSheetBackground方法相同,即添加背景图像,不同的是新增方法支持使用二进制数据设置背景图像,同时,SetSheetBackgroundFromBytes无需指定文件后缀,该方法可自行判断二进制数据中所包含图像的格式。

@jianxinhou jianxinhou changed the title Add new function SetBackgroundFromBytes used for setting background image by given image data Add new function SetSheetBackgroundFromBytes used for setting background image by given image data Nov 28, 2022
@xuri
Copy link
Member

xuri commented Nov 28, 2022

Thanks for your issue. I'll certainly accept that patch if you did that.

jianxinhou pushed a commit to jianxinhou/excelize that referenced this issue Nov 28, 2022
… used for setting background image by given image data

Change-Id: I56b5d85582e10d8a2a40b6cafab6e9b167883b1c
jianxinhou pushed a commit to jianxinhou/excelize that referenced this issue Nov 28, 2022
… used for setting background image by given image data

Change-Id: I83baac1107f66dfa5d9d2eebfa7e40f9f49b79d5
@jianxinhou
Copy link
Contributor Author

pull-request created!

@jianxinhou jianxinhou reopened this Nov 28, 2022
@xuri xuri linked a pull request Nov 29, 2022 that will close this issue
10 tasks
@xuri xuri closed this as completed in #1406 Dec 1, 2022
xuri pushed a commit that referenced this issue Dec 1, 2022
xuri pushed a commit to JDavidVR/excelize that referenced this issue Jul 11, 2023
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants