s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
ImageFileGenerator
chevron_left
Classes
class
ImageFileGenerator
search
Constructors
functions
ImageFileGenerator
Properties
data_object
Blur
data_object
Brightness
data_object
CacheToDisk
data_object
Colorize
data_object
Contrast
data_object
ConvertHeightToNormals
data_object
Cropping
data_object
FilePath
data_object
FlipHorizontal
data_object
FlipVertical
data_object
Hue
data_object
InvertColor
data_object
MaxSize
data_object
NormalScale
data_object
Padding
data_object
Rotate
data_object
Saturation
data_object
Sharpen
data_object
TargetColor
data_object
Tint
Methods
functions
CreateEmbeddedResource
lock
CreateTexture
ImageFileGenerator
Load images from disk and convert them to textures
class
Sandbox.Resources
.
account_tree
extends
TextureGenerator
Sandbox.Engine
build
Constructors
1
ImageFileGenerator
(
)
data_object
Properties
20
Blur
float
The intensity of the blur effect. If 0, no blur is applied.
Brightness
float
The brightness of the image.
CacheToDisk
bool
Colorize
bool
When enabled, every pixel in the image will be re-colored to the Sandbox.Resources.ImageFileGenerator.TargetColor (interpolated by the alpha).
Contrast
float
The contrast of the image.
ConvertHeightToNormals
bool
When enabled, the output texture will be a normal map generated from the heightmap of the image.
Cropping
Margin
How many pixels from each edge to crop from the image. If negative values are used, the image will be expanded instead of cropped.
FilePath
string
The path to the image file, relative to any other assets in the project.
FlipHorizontal
bool
Whether or not to flip the image horizontally. This is done after everything else has been applied.
FlipVertical
bool
Whether or not to flip the image vertically. This is done after everything else has been applied.
Hue
float
How much to adjust the hue of the image, in degrees. If 0, no hue adjustment is applied.
InvertColor
bool
Whether or not to invert the colors of the image.
MaxSize
int
The maximum size of the image in pixels. If the imported image is larger than this (after cropping), it will be downscaled to fit.
NormalScale
float
The scale of the normal map when using Sandbox.Resources.ImageFileGenerator.ConvertHeightToNormals. If negative, the normal map will be inverted.
Padding
Margin
How many pixels of padding from each edge. After the image has been cropped, padding is added without affecting the size of the image (scaling the original image down to fit padded margins).
Rotate
float
How much to rotate the image by, in degrees. This is applied after cropping and padding.
Saturation
float
The saturation of the image.
Sharpen
float
The intensity of the sharpen effect. If 0, no sharpening is applied.
TargetColor
Color
When Sandbox.Resources.ImageFileGenerator.Colorize is enabled, this is the target color that every pixel in the image will be re-colored to.
Tint
Color
The color the image should be tinted. This effectively multiplies the color of each pixel by this color (including alpha).
functions
Methods
2
CreateEmbeddedResource
(
)
Nullable`1
CreateTexture
(
options
,
ct
)
ValueTask`1
Inheritance
ResourceGenerator
ResourceGenerator<T>
TextureGenerator
ImageFileGenerator
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.