btastic / flutter_native_image

Native Flutter Image tools
Other
340 stars 137 forks source link

Rotating image #24

Open AlexBacich opened 6 years ago

AlexBacich commented 6 years ago

Is there a possibility to add image rotation feature? So it can be 90, 180, 270 degrees rotated. Not quite familiar with image resizing logic so asking as feature request.

btastic commented 6 years ago

If you just want to rotate images, you can always use this library: https://github.com/brendan-duncan/image

The only real problem this library tries to solve is copying the whole image in a dart array which takes a lot of time.

So if you just want to rotate images, which are not that big, your best bet is to use that library.

Otherwise I will leave it open as a feature request.

AlexBacich commented 6 years ago

Yes, I was using image library originally. With 3MB image it took 7 seconds to rotate which was an overkill. So now I'm using flutter_native_image to scale it first, and then rotate scaled version. Time decreased to 1s total.

Using 2 libraries still adds extra step of saving temporary file so having one library would be great.