Image clarity is losses after executing some codes in flutter

45 views Asked by At

Anybody have an idea about image package in flutter?? I have some code to customise the image file..

      img.Image? image = img.decodeImage(await file!.readAsBytes());
      img.Image? brightenedImage = img.adjustColor(image!, brightness: 1 + _brightnessValue);
      final Directory documentDirectory = await getApplicationDocumentsDirectory();
      final String documentPath = documentDirectory.path;
      File('$documentPath/example.jpeg').writeAsBytesSync(img.encodeJpg(image));
      final File receiptFile = File('$documentPath/example.jpeg');

After applying this code, the image clarity is losses. Anyone have an idea please reply...

0

There are 0 answers