I take a picture using ImagePicker that is saved like File. What I want is to convert it to png before upload it to FirebaseStorage. The problem is that when I try to convert it using this function:
File('test.png').writeAsBytesSync(encodePng(image));
it gave me error because the photo is saved like File not Image. I've googled for some type of plugin or function to convert it from File to Image but have found nothing concrete. Can anyone help me with this, please?
EDIT: Just to be sure I explained it clearly: I have photo 'photo 1.jpeg' that is stored like File, because this is what the ImagePicker does. Then I want to convert this File to Image and then convert it to .png