photofilters icon indicating copy to clipboard operation
photofilters copied to clipboard

Performing setstate of the page will cause the already loaded filters to be reloaded

Open 370966584 opened this issue 5 years ago • 2 comments

PhotoFilter is why StatelessWidget rebuilds multiple times?

370966584 avatar Dec 31 '19 02:12 370966584

to be honest, I have currently the same problem that everytime I select one of the thumbnail images and call setState (or in my case notifylistener via the provider package) all the thumbnail images are being rebuild. This of course kills the performance of the app and makes it for around 2 seconds unusable. Im currently experimenting with the possibility to create custom Colorfilters(from the flutter Colorfilter.matrix constructor) to only paint over the thumbnail images (and not manipulate them) and only manipulate the main images with the colorfilters provided in this package. Well if its working, I will properly commit a pull request, so you can also use it. Screenshot 2020-06-13 at 10 34 49

Letalus avatar Jun 13 '20 08:06 Letalus

Can you help me with one thing i don't understand how to do that.Please i am grateful to you if you help me.
PhotoFilter _photoFilter; Filter _filter = presetFiltersList[23]; _photoFilter = new PhotoFilter( image: image, filename: fileName, filter: _filter, fit: BoxFit.fill, ); After doing that I need the filtered image. Uint32List _uint32list = _photoFilter.image.data; Uint8List byte_data= _uint32list.buffer.asUint8List(); i did that process to get the filtered image.but could not. wheni try to read the filtered image in Image.memory(byte_data); showing that "Exception: Invalid image data" can you help me please ?

An19ik89 avatar Aug 27 '20 08:08 An19ik89