Forum

> > CS2D > Scripts > Removing the black parts from images
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Removing the black parts from images

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Removing the black parts from images

D-D3ADxPro
User Off Offline

Zitieren
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?

alt Re: Removing the black parts from images

MikuAuahDark
User Off Offline

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

cs2d lua cmd image hat geschrieben
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.

alt Re: Removing the black parts from images

MikuAuahDark
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht