ovideo Posted October 11, 2011 Share Posted October 11, 2011 Hello. I am working on a script and i've hit a wall. Short story: i'm at the point where i need to make a .png transparent, like you can do manually with irfanview (all the colors remain the same, only white becomes transparent). I don't need anything fancy, but it would help if it were very fast... perhaps a color remap of some sort? This is where it goes in: ; either make the png at $_PngPath2 transparent... $_Image = _GDIPlus_ImageLoadFromFile($_PngPath2) ; or make $_Image transparent _SetBitmap($_gui, $_Image, 255, $_m, $_m) ; -> puts the png on the GUI If the png is transparent it is displayed properly, but unfortunately it's never transparent. Help, please? Link to comment Share on other sites More sharing options...
ovideo Posted October 11, 2011 Author Share Posted October 11, 2011 (edited) Problem solved, using ImageMagick Object, as presented $img = ObjCreate("ImageMagickObject.MagickImage.1") $ret = $img.Convert($_PngPath2, _ "-transparent", "white", _ $_PngPath2 edit: my other problem had an obvious fix, seems i'm too tired. Edited October 11, 2011 by ovideo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now