Jump to content

How do I get rid of transparent background from image I downloaded via URL?


darren120
 Share

Recommended Posts

Hello, I am having trouble making image transparent. 

 var gun = PIXI.Sprite.from('https://lh3.googleusercontent.com/proxy/1m3JwswvxsFQiPf0NGfFQ2zwdrs2Ynn2SCFRPwC2TdikKUNeUt6nEf-zkyV8Qn-cxZWWNEpboigze08R-gq4seJ-5P9RXgmbsaeyoaD1jVUCUAji1QnZTv4_wieLDpWjPSpe2ZVlXogs')

Please help. thanks. 

Link to comment
Share on other sites

Just now, ivan.popelyshev said:

I'm sorry for meme-posting.

Only photoshop or something like paint.net can help you, its not in the html5 scope.

its ok. :( i thought we can apply something that recognizes the famous transparent sequence... man im gonna have to rethink my approach. I'll be using alot of images from another API and can't really ps everything 

Link to comment
Share on other sites

Yes, its possible, if you know how to use canvas2d api and you can just FOR-it and change the image before it gets uploaded to webgl:

how to use resource: https://pixijs.io/examples/#/textures/gradient-resource.js

and about img - you can use pixi BaseImageResource/ImageResource as base or make a new one, just set the size of image when its loaded https://github.com/pixijs/pixijs/blob/55da4f04b3d5dba4a0f507550d25cb6335d975fa/packages/core/src/textures/resources/ImageResource.ts

yes, we lack the full example of such thing, you have to understand texture resource code first

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...