Transparent jpg in one file?


(Nirvan) #1

Hi all, I have image like this: http://imageshack.us/a/img811/5332/nw5h.png But in png this file is very large. If there is possibity to make transparent image from this: http://imageshack.us/a/img20/555/gplr.jpg to convert black pixels to transparent. size of game will be much lower. ( I know about png optimization but lowest size will be 150 with lower quality ) Exists this possibility?

Thanks.

Edit: Ok I can load jpg file and then set image blend to “add” but with this render time will not be much slower? Because previously when I was using add blend mode render time was bigger.


(Zachary Lewis) #2

You can set an Image's drawMask property to your image, and this should make areas that are black fully transparent and areas that are white fully opaque.


(rostok) #3

sligthly offtopic: flash can store PNGs in lossy compression internal formats (JPEG if I am correct). there was a reducer tool created by joa ebert, but now it seems to evolved into sth more called “apparat”. https://github.com/joa/apparat with this you can reduce size of SWF by forcing lossy compression to all store bitmaps.