Module image

Consts

FORMAT_L8 = 0'i64
FORMAT_LA8 = 1'i64
FORMAT_R8 = 2'i64
FORMAT_RG8 = 3'i64
FORMAT_RGB8 = 4'i64
FORMAT_RGBA8 = 5'i64
FORMAT_RGBA4444 = 6'i64
FORMAT_RGBA5551 = 7'i64
FORMAT_RF = 8'i64
FORMAT_RGF = 9'i64
FORMAT_RGBF = 10'i64
FORMAT_RGBAF = 11'i64
FORMAT_RH = 12'i64
FORMAT_RGH = 13'i64
FORMAT_RGBH = 14'i64
FORMAT_RGBAH = 15'i64
FORMAT_RGBE9995 = 16'i64
FORMAT_DXT1 = 17'i64
FORMAT_DXT3 = 18'i64
FORMAT_DXT5 = 19'i64
FORMAT_RGTC_R = 20'i64
FORMAT_RGTC_RG = 21'i64
FORMAT_BPTC_RGBA = 22'i64
FORMAT_BPTC_RGBF = 23'i64
FORMAT_BPTC_RGBFU = 24'i64
FORMAT_PVRTC2 = 25'i64
FORMAT_PVRTC2A = 26'i64
FORMAT_PVRTC4 = 27'i64
FORMAT_PVRTC4A = 28'i64
FORMAT_ETC = 29'i64
FORMAT_ETC2_R11 = 30'i64
FORMAT_ETC2_R11S = 31'i64
FORMAT_ETC2_RG11 = 32'i64
FORMAT_ETC2_RG11S = 33'i64
FORMAT_ETC2_RGB8 = 34'i64
FORMAT_ETC2_RGBA8 = 35'i64
FORMAT_ETC2_RGB8A1 = 36'i64
FORMAT_MAX = 37'i64
INTERPOLATE_NEAREST = 0'i64
INTERPOLATE_BILINEAR = 1'i64
INTERPOLATE_CUBIC = 2'i64
ALPHA_NONE = 0'i64
ALPHA_BIT = 1'i64
ALPHA_BLEND = 2'i64
COMPRESS_S3TC = 0'i64
COMPRESS_PVRTC2 = 1'i64
COMPRESS_PVRTC4 = 2'i64
COMPRESS_ETC = 3'i64
COMPRESS_ETC2 = 4'i64
COMPRESS_SOURCE_GENERIC = 0'i64
COMPRESS_SOURCE_SRGB = 1'i64
COMPRESS_SOURCE_NORMAL = 2'i64

Procs

proc data(self: Image): Dictionary {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc data=(self: Image; val: Dictionary) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getWidth(self: Image): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getHeight(self: Image): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getSize(self: Image): Vector2 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc hasMipmaps(self: Image): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getFormat(self: Image): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getDataImpl(self: Image): PoolByteArray {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc convert(self: Image; format: int64) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getMipmapOffset(self: Image; mipmap: int64): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc resizeToPo2(self: Image; square: bool = false) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc resize(self: Image; width: int64; height: int64; interpolation: int64 = 1'i64) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc shrinkX2(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc expandX2Hq2x(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc crop(self: Image; width: int64; height: int64) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc flipX(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc flipY(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc generateMipmaps(self: Image; renormalize: bool = false): Error {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc clearMipmaps(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc create(self: Image; width: int64; height: int64; useMipmaps: bool; format: int64) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc createFromData(self: Image; width: int64; height: int64; useMipmaps: bool;
                   format: int64; data: PoolByteArray) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc isEmpty(self: Image): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc load(self: Image; path: string): Error {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc savePng(self: Image; path: string): Error {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc detectAlpha(self: Image): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc isInvisible(self: Image): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc compress(self: Image; mode: int64; source: int64; lossyQuality: float64): Error {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc decompress(self: Image): Error {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc isCompressed(self: Image): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc fixAlphaEdges(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc premultiplyAlpha(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc srgbToLinear(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc normalmapToXy(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc rgbeToSrgb(self: Image): Image {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bumpmapToNormalmap(self: Image; bumpScale: float64 = 1.0) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc blitRect(self: Image; src: Image; srcRect: Rect2; dst: Vector2) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc blitRectMask(self: Image; src: Image; mask: Image; srcRect: Rect2; dst: Vector2) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc blendRect(self: Image; src: Image; srcRect: Rect2; dst: Vector2) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc blendRectMask(self: Image; src: Image; mask: Image; srcRect: Rect2; dst: Vector2) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc fill(self: Image; color: Color) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getUsedRect(self: Image): Rect2 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getRect(self: Image; rect: Rect2): Image {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc copyFrom(self: Image; src: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc lock(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc unlock(self: Image) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getPixelv(self: Image; src: Vector2): Color {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getPixel(self: Image; x: int64; y: int64): Color {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc setPixelv(self: Image; dst: Vector2; color: Color) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc setPixel(self: Image; x: int64; y: int64; color: Color) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc loadPngFromBuffer(self: Image; buffer: PoolByteArray): Error {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc loadJpgFromBuffer(self: Image; buffer: PoolByteArray): Error {.
gcsafe, locks: 0, raises: [], tags: []
.}