ImageGlass
                                
                                 ImageGlass copied to clipboard
                                
                                    ImageGlass copied to clipboard
                            
                            
                            
                        Add support for reducing the size of image with lossless compression
The Magick.NET library contains an ImageOptimizer that can be used to reduce the size of an image with lossless compression. Would you be open to a pull request that adds support for this to ImageGlass? Not sure where should be added in the menu though. Maybe in the Image menu? And would you be okay with this only be added to the v9 branch?
v9 is a good branch! Note that the source code of v9 is in the v9 folder.
Since the upcoming v9.0 beta 4 will support "Tools" menu, including built-in and external tools. This ImageOptimizer can be added as a built-in tool, may be called Image optimizer, in the Tools menu.
You can add a new ToolstripMenuItem called MnuImageOptimizer.
- In FrmMain.IGMethods.cs, write a methodIG_OptimizeImage().
- In the click event of the menu MnuImageOptimizer_Clicked(), call theIG_OptimizeImage()function.
- To show a message to user, there are 2 ways:
- PicMain.ShowMessage()is for short time and unimportant message. It is usually dismissed after the task is done or exceed the duration from- Config.InAppMessageDuration.
- Config.ShowError(),- Config.ShowInfo(),- Config.ShowWarning()are for important and persistent message. It's only dismissed by the user.
 
For the external tools, it's loaded via the settings Tools in igconfig.json. The Exif tool from v8 will be decoupled as a standalone tool. Currently, I put a placeholder for it in the Tools menu:

The setting for external tool is as below: https://github.com/d2phap/ImageGlass/blob/633d457ce3347765a6c39b97afe6349d411a6fe6/v9/Components/ImageGlass.Settings/Config.cs#L735-L748