heckofaheic

Last updated:

0 purchases

heckofaheic Image
heckofaheic Images
Add to Cart

Description:

heckofaheic

heckofaheic #

Converts HEIC into PNG/JPEG/GIF using heic2any.
Useful in case your users are uploading HEIC images to your Flutter web app
that need to be displayed correctly, as HEIC is not supported by most browsers.
Web only
Getting started #

Please download a copy of heic2any.min.js on alexcorvi.github.io/heic2any
Save it in your Flutter project's web folder, next to index.html
Link the script in your index.html, like so:
<script src="heic2any.min.js" type="application/javascript"></script>
copied to clipboard

Add a new script tag to your index.html, with the following content:
<script>
function executeHeic2any(blob, multiple, toType, quality, gifInterval) {
return heic2any({
blob,
multiple: multiple,
toType: toType,
quality: quality,
gifInterval: gifInterval
});
}
</script>
copied to clipboard


Usage #
import "package:heckofaheic/heckofaheic.dart";

Future<void> myFunction() async {
Uint8List imageBytes = await getYourImageBytesSomehow();

if (HeckOfAHeic.isHEIC(imageBytes)) {
imageBytes = await HeckOfAHeic.convert(imageBytes);
}
}
copied to clipboard
For the full API documentation, please refer to the API reference.
Additional information #
have fun.

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.