flutter_image_compress icon indicating copy to clipboard operation
flutter_image_compress copied to clipboard

Support for Linux and Windows platform

Open iamkartiknayak opened this issue 1 year ago • 4 comments

Platforms

Windows, Linux

Description

Two major plaforms are missing the implementation of compressing image via Uint8List or actual file. Image.memory() isn't efficient in dealing with larger number of Uint8List data and has a larger memory footprint on the app as we add more Uint8List data in the runtime.

Why

There are many windows flutter dev facing the same issue when dealing with image data efficiently, Adding support to Windows and Linux would complete the impl for all major OS helping the application serve a wider audience.

iamkartiknayak avatar Feb 05 '24 14:02 iamkartiknayak

Will be awesome to have this feature

dannycortesv avatar Feb 09 '24 16:02 dannycortesv

actually so I created simple_native_image_compress so that you just send the path string and gets image as Uint8List in return and it also supports both Windows and Linux.

hwkim1127 avatar Apr 25 '24 14:04 hwkim1127

actually so I created simple_native_image_compress so that you just send the path string and gets image as Uint8List in return and it also supports both Windows and Linux.

@hwkim1127 I tried to use your packages but got this. Can you help me how I can fix this

[ ] SEVERE : Cargokit BuildTool failed with error : [C:\work\flutter\androp\build\windows\x64\plugins\simple_native_image_compress\simple_native_image_compress_cargokit.vcxproj] [ ] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\work\flutter\androp\build\windows\x64\CMakeFiles\d2cadfdd70b453df3c30d8e1388e44e4\native_image_compress.dll.rule;C:\work\flutter\androp\build\windows\x64\CMakeFiles\e6a54e3983 6c32c0b6f5f3d9c57e0960\simple_native_image_compress_cargokit.rule' exited with code -1. [C:\work\flutter\androp\build\windows\x64\plugins\simple_native_image_compress\simple_native_image_compress_cargokit.vcxproj]

sammanart avatar Apr 25 '24 14:04 sammanart

actually so I created simple_native_image_compress so that you just send the path string and gets image as Uint8List in return and it also supports both Windows and Linux.

@hwkim1127 I tried to use your packages but got this. Can you help me how I can fix this

[ ] SEVERE : Cargokit BuildTool failed with error : [C:\work\flutter\androp\build\windows\x64\plugins\simple_native_image_compress\simple_native_image_compress_cargokit.vcxproj] [ ] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\work\flutter\androp\build\windows\x64\CMakeFiles\d2cadfdd70b453df3c30d8e1388e44e4\native_image_compress.dll.rule;C:\work\flutter\androp\build\windows\x64\CMakeFiles\e6a54e3983 6c32c0b6f5f3d9c57e0960\simple_native_image_compress_cargokit.rule' exited with code -1. [C:\work\flutter\androp\build\windows\x64\plugins\simple_native_image_compress\simple_native_image_compress_cargokit.vcxproj]

did you install rust? I actually updated the README so that you can setup the requirements

hwkim1127 avatar Apr 25 '24 17:04 hwkim1127