Forum

> > CS2D > Scripts > Removing the black parts from images
Forums overviewCS2D overview Scripts overviewLog in to reply

English Removing the black parts from images

7 replies
To the start Previous 1 Next To the start

old Removing the black parts from images

D-D3ADxPro
User Off Offline

Quote
Hello us ! I was wonering if you could remove the black parts from a image.

Heres a screen if you're stuck: http://prntscr.com/1aik18

I want all the black parts removed from the image, without changing the quality of the image. Is their any script that could remove black parts from images?

old Re: Removing the black parts from images

MikuAuahDark
User Off Offline

Quote
Tired this?
1
image("[pathofimage]<b>",x,y,mode)

cs2d lua cmd image has written
Special path values and tags
Moreover you can use some built-in images with this function by using one of the following values for the path parameter or attach tags to change the loading behavior:

• "<tile:X>" - a tile from the tileset that is used in the current map, with X being the ID of a tile, starting at 0 for the first tile in the tileset
• PATH<b> - black pixels (rgb 0,0,0 or HEX #000000) will become invisible in the specified image (this mode is used by default but another masking method might be used if the image has been loaded before with another method. So please use this tag if masking of black pixels is important)
• PATH<m> - magenta pixels (rgb 255,0,255 or HEX #FF00FF) will become invisible in the specified image
• PATH<a> - alpha values (opacity) will be set depending on the brightness of pixels
• PATH<n> - no masking. The image will be loaded and displayed as it is.

old Re: Removing the black parts from images

MikuAuahDark
User Off Offline

Quote
there is no need a script for this.

you just need to use "image" function normally, but on "path"(first) parameter/argument, put "<b>" at end of path. still not work? make sure the black pixels is rgb(0,0,0)/#000000
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview