Function
Static Public Summary | ||
public |
Clamping is the process of limiting a position to an area |
|
public |
colorStringToUint32(str: *): * |
|
public |
decodeJPEGFromStream(data: Stream): Promise<Bitmap> Decode JPEG From Stream |
|
public |
decodePNGFromStream(instream: Stream): Promise<Bitmap> Decode PNG From Stream |
|
public |
encodeJPEGToStream(img: Bitmap, outstream: Stream, Number: Int): Promise<void> Encode JPEG To Stream |
|
public |
encodePNGToStream(bitmap: Bitmap, outstream: Stream): Promise<void> Encode the PNG image to output stream |
|
public |
Create a new bitmap image |
|
public |
measureText(ctx: Context, text: string): object Process Text Path |
|
public |
Process Text Path |
|
public |
registerFont(binaryPath: string, family: string, weight: number, style: string, variant: string): font Register Font |
Static Public
public clamp(value: number, min: number, max: number): number source
import {clamp} from 'pureimage/src/util.js'
Clamping is the process of limiting a position to an area
public colorStringToUint32(str: *): * source
import {colorStringToUint32} from 'pureimage/src/util.js'
Params:
Name | Type | Attribute | Description |
str | * |
Return:
* |
public decodeJPEGFromStream(data: Stream): Promise<Bitmap> source
import {decodeJPEGFromStream} from 'pureimage'
Decode JPEG From Stream
Decode a JPEG image from an incoming stream of data
Params:
Name | Type | Attribute | Description |
data | Stream | A readable stream to decode JPEG data from |
public decodePNGFromStream(instream: Stream): Promise<Bitmap> source
import {decodePNGFromStream} from 'pureimage'
Decode PNG From Stream
Decode a PNG file from an incoming readable stream
Params:
Name | Type | Attribute | Description |
instream | Stream | A readable stream containing raw PNG data |
public encodeJPEGToStream(img: Bitmap, outstream: Stream, Number: Int): Promise<void> source
import {encodeJPEGToStream} from 'pureimage'
Encode JPEG To Stream
Encode the JPEG image to output stream
public encodePNGToStream(bitmap: Bitmap, outstream: Stream): Promise<void> source
import {encodePNGToStream} from 'pureimage'
Encode the PNG image to output stream
public make(w: number, h: number, options: object): Bitmap source
import {make} from 'pureimage'
Create a new bitmap image
public measureText(ctx: Context, text: string): object source
import {measureText} from 'pureimage/src/text.js'
Process Text Path
public processTextPath(ctx: Context, text: string, x: number, y: number, fill: boolean): void source
import {processTextPath} from 'pureimage/src/text.js'
Process Text Path
Return:
void |