dart_libass

Creator: coderz1093

Last updated:

0 purchases

dart_libass Image
dart_libass Images

Languages

Categories

Add to Cart

Description:

dart libass

File subtitle = File('./test/1.ass');
File subtitle2 = File('./test/2.ass');
File defaultFont = File('./test/Montserrat-Bold.ttf');

DartLibass dartLibass = DartLibass(
subtitle: subtitle,
defaultFont: defaultFont,
defaultFamily: 'Montserrat-Bold',
width: 1920,
height: 1080,
fonts: [defaultFont],
);

await dartLibass.init();

dartLibass.setTrack(subtitle2);

Image img = await dartLibass.getFrame(25001);

dartLibass.dispose();

ByteData? pngBytes = await img.toByteData(format: ImageByteFormat.png);

File('test.png').writeAsBytesSync(
pngBytes!.buffer.asUint8List(
pngBytes.offsetInBytes,
pngBytes.lengthInBytes,
),
);
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.