Background transparency
Closed this issue · 6 comments
ploner commented
Btw, great library!
I was not able to save a 3D mesh into a 2D PNG with transparent background. Tried:
vpl.gcf() is fig
vpl.mesh_plot(mesh)
fig.background_color = [0, 0., 0., 0.]
vpl.save_fig('fig.png', magnification=1, off_screen=True)
Did I miss something?
Thanks.
bwoodsend commented
Ahh, now that reminds me that yonks ago, someone went and addressed that and I meant to cherry-pick it but didn't. Hang on whilst I do that...
bwoodsend commented
Ughh, I keep forgetting how much I dislike working on this project. It's like tiptoeing through a minefield made out of seg-faults.
I've got a change ready. Mind giving it a go?
pip install https://github.com/bwoodsend/vtkplotlib/archive/refs/heads/background-opacity.zip
then just rerun your code.
ploner commented
Yes, will check it today.
Thx!
… On 15 May 2022, at 22:59, Brénainn Woodsend ***@***.***> wrote:
Ughh, I keep forgetting how much I dislike working on this project. It's like tiptoeing through a minefield made out of seg-faults.
I've got a change ready. Mind giving it a go?
pip install https://github.com/bwoodsend/vtkplotlib/archive/refs/heads/background-opacity.zip
then just rerun your code.
—
Reply to this email directly, view it on GitHub <#12 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACZC6TK6EC27AJB6RNVOB6LVKFQR3ANCNFSM5VXXFIDQ>.
You are receiving this because you authored the thread.
ploner commented
It worked!
The resulting PNG file has a transparent background as requested!
Do you merge the code into the main branch?
Thanks a lot!
bwoodsend commented
Cool, I'll merge it into master
then release it then.
ploner commented
Perfect - thank you!
…On Mon, May 16, 2022 at 11:08 PM Brénainn Woodsend ***@***.***> wrote:
Cool, I'll merge it into master then release it then.
—
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZC6TO3F7PXV6MS5NZNZELVKK2LBANCNFSM5VXXFIDQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>