swc/bundler/tests/.cache/deno/8629bcfba42545b2ee1ce8248bc5aae68d58ab1b.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

30 lines
708 B
TypeScript

// Loaded from https://deno.land/x/deno_image@v0.0.3/lib/decoders/fast-png/index.ts
import PNGDecoder from './PNGDecoder.ts';
import PNGEncoder from './PNGEncoder.ts';
import {
DecoderInputType,
IPNGDecoderOptions,
IDecodedPNG,
IImageData,
IPNGEncoderOptions,
} from './types.ts';
export * from './types.ts';
function decodePNG(
data: DecoderInputType,
options?: IPNGDecoderOptions,
): IDecodedPNG {
const decoder = new PNGDecoder(data, options);
return decoder.decode();
}
function encodePNG(png: IImageData, options?: IPNGEncoderOptions): Uint8Array {
const encoder = new PNGEncoder(png, options);
return encoder.encode();
}
export { decodePNG as decode, encodePNG as encode };