How can I get a Uint8List image size?
2,471
try this,
print(uint8ListImage.lengthInBytes);
this will print the size in bytes
Author by
Axes Grinds
Updated on December 13, 2022Comments
-
Axes Grinds over 1 year
I want to find out the size of an
Uint8List
image before I upload it to firebase storage usingStorageUploadTask uploadTask = reference.putData(uint8ListImage);
wherein
uint8ListImage
is aUint8List
. Is there a way to find out the size of theUint8List
?-
Claudio Redi almost 4 yearsSize in bytes or in pixels? If you just need the size in bytes... then you just need
uint8ListImage.length
-
Axes Grinds almost 4 yearsyeah, I need just size in bytes. Can you post your comment as an answer so that I can accept it as the answer?
-