├── .editorconfig ├── .gitattributes ├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── build.yaml ├── .gitignore ├── ImageOptimizer.sln ├── LICENSE ├── README.md ├── appveyor.yml ├── art ├── context-menu.png ├── output-window.png └── resize.png ├── src ├── Commands │ ├── CopyBase64Command.cs │ ├── OptimizeLosslessCommand.cs │ ├── OptimizeLossyCommand.cs │ ├── ResizeCommand.cs │ ├── WorkspaceOptimizeCommand.cs │ └── WorkspaceResizeCommand.cs ├── Compression │ ├── Cache.cs │ ├── CompressionHandler.cs │ ├── CompressionResult.cs │ ├── CompressionType.cs │ └── Compressor.cs ├── ImageOptimizer.cs ├── ImageOptimizer.csproj ├── ImageOptimizer.vsct ├── ImageOptimizerPackage.cs ├── Options │ └── General.cs ├── Properties │ └── AssemblyInfo.cs ├── Resizing │ ├── ResizingDialog.xaml │ └── ResizingDialog.xaml.cs ├── Resources │ ├── Tools │ │ ├── gifsicle.exe │ │ └── pingo.exe │ └── icon.png ├── source.extension.cs └── source.extension.vsixmanifest ├── test └── ImageOptimizer.Test │ ├── Artifacts │ ├── gif │ │ ├── animation-cartoon.gif │ │ ├── animation-road.gif │ │ ├── animation-screenshot.gif │ │ ├── colors.gif │ │ ├── line-drawing.gif │ │ ├── logo.gif │ │ └── screenshot-large.gif │ ├── jpg │ │ ├── clouds-original.jpg │ │ ├── dog1.jpg │ │ ├── dog2.jpg │ │ ├── dog3.jpg │ │ ├── dog4.jpg │ │ ├── dog5.jpg │ │ └── lake.jpg │ ├── png │ │ ├── AddClass.png │ │ ├── Bower.png │ │ ├── ducati.png │ │ ├── grunt.png │ │ ├── logo.png │ │ └── screenshot.png │ └── svg │ │ ├── fail.svg │ │ ├── success.svg │ │ └── success2.svg │ ├── Base64Test.cs │ ├── CacheTest.cs │ ├── CompressionResultTests.cs │ ├── CompressionTest.cs │ ├── ImageOptimizer.Test.csproj │ └── Properties │ └── AssemblyInfo.cs └── vs-publish.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome:http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Don't use tabs for indentation. 7 | [*] 8 | indent_style = space 9 | end_of_line = crlf 10 | # (Please don't specify an indent_size here; that has too many unintended consequences.) 11 | 12 | # Code files 13 | [*.{cs,csx,vb,vbx}] 14 | indent_size = 4 15 | 16 | # Xml project files 17 | [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] 18 | indent_size = 2 19 | 20 | # Xml config files 21 | [*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] 22 | indent_size = 2 23 | 24 | # JSON files 25 | [*.json] 26 | indent_size = 2 27 | 28 | # Dotnet code style settings: 29 | [*.{cs,vb}] 30 | # Sort using and Import directives with System.* appearing first 31 | dotnet_sort_system_directives_first = true 32 | dotnet_separate_import_directive_groups = false 33 | 34 | # Avoid "this." and "Me." if not necessary 35 | dotnet_style_qualification_for_field = false : suggestion 36 | dotnet_style_qualification_for_property = false : suggestion 37 | dotnet_style_qualification_for_method = false : suggestion 38 | dotnet_style_qualification_for_event = false : suggestion 39 | 40 | # Use language keywords instead of framework type names for type references 41 | dotnet_style_predefined_type_for_locals_parameters_members = true : suggestion 42 | dotnet_style_predefined_type_for_member_access = true : suggestion 43 | 44 | # Suggest more modern language features when available 45 | dotnet_style_object_initializer = true : suggestion 46 | dotnet_style_collection_initializer = true : suggestion 47 | dotnet_style_coalesce_expression = true : suggestion 48 | dotnet_style_null_propagation = true : suggestion 49 | dotnet_style_explicit_tuple_names = true : suggestion 50 | 51 | # Naming rules - async methods to be prefixed with Async 52 | dotnet_naming_rule.async_methods_must_end_with_async.severity = warning 53 | dotnet_naming_rule.async_methods_must_end_with_async.symbols = method_symbols 54 | dotnet_naming_rule.async_methods_must_end_with_async.style = end_in_async_style 55 | 56 | dotnet_naming_symbols.method_symbols.applicable_kinds = method 57 | dotnet_naming_symbols.method_symbols.required_modifiers = async 58 | 59 | dotnet_naming_style.end_in_async_style.capitalization = pascal_case 60 | dotnet_naming_style.end_in_async_style.required_suffix = Async 61 | 62 | # Naming rules - private fields must start with an underscore 63 | dotnet_naming_rule.field_must_start_with_underscore.severity = warning 64 | dotnet_naming_rule.field_must_start_with_underscore.symbols = private_fields 65 | dotnet_naming_rule.field_must_start_with_underscore.style = start_underscore_style 66 | 67 | dotnet_naming_symbols.private_fields.applicable_kinds = field 68 | dotnet_naming_symbols.private_fields.applicable_accessibilities = private 69 | 70 | dotnet_naming_style.start_underscore_style.capitalization = camel_case 71 | dotnet_naming_style.start_underscore_style.required_prefix = _ 72 | 73 | # CSharp code style settings: 74 | [*.cs] 75 | # Prefer "var" everywhere 76 | csharp_style_var_for_built_in_types = true : suggestion 77 | csharp_style_var_when_type_is_apparent = true : suggestion 78 | csharp_style_var_elsewhere = false : suggestion 79 | 80 | # Prefer method-like constructs to have a block body 81 | csharp_style_expression_bodied_methods = false : none 82 | csharp_style_expression_bodied_constructors = false : none 83 | csharp_style_expression_bodied_operators = false : none 84 | 85 | # Prefer property-like constructs to have an expression-body 86 | csharp_style_expression_bodied_properties = true : none 87 | csharp_style_expression_bodied_indexers = true : none 88 | csharp_style_expression_bodied_accessors = true : none 89 | 90 | # Suggest more modern language features when available 91 | csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion 92 | csharp_style_pattern_matching_over_as_with_null_check = true : suggestion 93 | csharp_style_inlined_variable_declaration = true : suggestion 94 | csharp_style_throw_expression = true : suggestion 95 | csharp_style_conditional_delegate_call = true : suggestion 96 | 97 | # Newline settings 98 | csharp_new_line_before_open_brace = all 99 | csharp_new_line_before_else = true 100 | csharp_new_line_before_catch = true 101 | csharp_new_line_before_finally = true 102 | csharp_new_line_before_members_in_object_initializers = true 103 | csharp_new_line_before_members_in_anonymous_types = true -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | 24 | src/Compression/Compressor.cs text 25 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | @mkristensen on Twitter. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Looking to contribute something? **Here's how you can help.** 4 | 5 | Please take a moment to review this document in order to make the contribution 6 | process easy and effective for everyone involved. 7 | 8 | Following these guidelines helps to communicate that you respect the time of 9 | the developers managing and developing this open source project. In return, 10 | they should reciprocate that respect in addressing your issue or assessing 11 | patches and features. 12 | 13 | 14 | ## Using the issue tracker 15 | 16 | The issue tracker is the preferred channel for [bug reports](#bug-reports), 17 | [features requests](#feature-requests) and 18 | [submitting pull requests](#pull-requests), but please respect the 19 | following restrictions: 20 | 21 | * Please **do not** use the issue tracker for personal support requests. Stack 22 | Overflow is a better place to get help. 23 | 24 | * Please **do not** derail or troll issues. Keep the discussion on topic and 25 | respect the opinions of others. 26 | 27 | * Please **do not** open issues or pull requests which *belongs to* third party 28 | components. 29 | 30 | 31 | ## Bug reports 32 | 33 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 34 | Good bug reports are extremely helpful, so thanks! 35 | 36 | Guidelines for bug reports: 37 | 38 | 1. **Use the GitHub issue search** — check if the issue has already been 39 | reported. 40 | 41 | 2. **Check if the issue has been fixed** — try to reproduce it using the 42 | latest `master` or development branch in the repository. 43 | 44 | 3. **Isolate the problem** — ideally create an 45 | [SSCCE](http://www.sscce.org/) and a live example. 46 | Uploading the project on cloud storage (OneDrive, DropBox, et el.) 47 | or creating a sample GitHub repository is also helpful. 48 | 49 | 50 | A good bug report shouldn't leave others needing to chase you up for more 51 | information. Please try to be as detailed as possible in your report. What is 52 | your environment? What steps will reproduce the issue? What browser(s) and OS 53 | experience the problem? Do other browsers show the bug differently? What 54 | would you expect to be the outcome? All these details will help people to fix 55 | any potential bugs. 56 | 57 | Example: 58 | 59 | > Short and descriptive example bug report title 60 | > 61 | > A summary of the issue and the Visual Studio, browser, OS environments 62 | > in which it occurs. If suitable, include the steps required to reproduce the bug. 63 | > 64 | > 1. This is the first step 65 | > 2. This is the second step 66 | > 3. Further steps, etc. 67 | > 68 | > `` - a link to the project/file uploaded on cloud storage or other publicly accessible medium. 69 | > 70 | > Any other information you want to share that is relevant to the issue being 71 | > reported. This might include the lines of code that you have identified as 72 | > causing the bug, and potential solutions (and your opinions on their 73 | > merits). 74 | 75 | 76 | ## Feature requests 77 | 78 | Feature requests are welcome. But take a moment to find out whether your idea 79 | fits with the scope and aims of the project. It's up to *you* to make a strong 80 | case to convince the project's developers of the merits of this feature. Please 81 | provide as much detail and context as possible. 82 | 83 | 84 | ## Pull requests 85 | 86 | Good pull requests, patches, improvements and new features are a fantastic 87 | help. They should remain focused in scope and avoid containing unrelated 88 | commits. 89 | 90 | **Please ask first** before embarking on any significant pull request (e.g. 91 | implementing features, refactoring code, porting to a different language), 92 | otherwise you risk spending a lot of time working on something that the 93 | project's developers might not want to merge into the project. 94 | 95 | Please adhere to the [coding guidelines](#code-guidelines) used throughout the 96 | project (indentation, accurate comments, etc.) and any other requirements 97 | (such as test coverage). 98 | 99 | Adhering to the following process is the best way to get your work 100 | included in the project: 101 | 102 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, 103 | and configure the remotes: 104 | 105 | ```bash 106 | # Clone your fork of the repo into the current directory 107 | git clone https://github.com//.git 108 | # Navigate to the newly cloned directory 109 | cd 110 | # Assign the original repo to a remote called "upstream" 111 | git remote add upstream https://github.com/madskristensen/.git 112 | ``` 113 | 114 | 2. If you cloned a while ago, get the latest changes from upstream: 115 | 116 | ```bash 117 | git checkout master 118 | git pull upstream master 119 | ``` 120 | 121 | 3. Create a new topic branch (off the main project development branch) to 122 | contain your feature, change, or fix: 123 | 124 | ```bash 125 | git checkout -b 126 | ``` 127 | 128 | 4. Commit your changes in logical chunks. Please adhere to these [git commit 129 | message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 130 | or your code is unlikely be merged into the main project. Use Git's 131 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 132 | feature to tidy up your commits before making them public. Also, prepend name of the feature 133 | to the commit message. For instance: "SCSS: Fixes compiler results for IFileListener.\nFixes `#123`" 134 | 135 | 5. Locally merge (or rebase) the upstream development branch into your topic branch: 136 | 137 | ```bash 138 | git pull [--rebase] upstream master 139 | ``` 140 | 141 | 6. Push your topic branch up to your fork: 142 | 143 | ```bash 144 | git push origin 145 | ``` 146 | 147 | 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) 148 | with a clear title and description against the `master` branch. 149 | 150 | 151 | ## Code guidelines 152 | 153 | - Always use proper indentation. 154 | - In Visual Studio under `Tools > Options > Text Editor > C# > Advanced`, make sure 155 | `Place 'System' directives first when sorting usings` option is enabled (checked). 156 | - Before committing, organize usings for each updated C# source file. Either you can 157 | right-click editor and select `Organize Usings > Remove and sort` OR use extension 158 | like [BatchFormat](https://marketplace.visualstudio.com/items?itemName=vs-publisher-147549.BatchFormat). 159 | - Before committing, run Code Analysis in `Debug` configuration and follow the guidelines 160 | to fix CA issues. Code Analysis commits can be made separately. 161 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: madskristensen 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Installed product versions 2 | - Visual Studio: [example 2015 Professional] 3 | - This extension: [example 1.1.21] 4 | 5 | ### Description 6 | Replace this text with a short description 7 | 8 | ### Steps to recreate 9 | 1. Replace this 10 | 2. text with 11 | 3. the steps 12 | 4. to recreate 13 | 14 | ### Current behavior 15 | Explain what it's doing and why it's wrong 16 | 17 | ### Expected behavior 18 | Explain what it should be doing after it's fixed. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/build.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/.github/workflows/build.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | packages 4 | test/**/*.txt 5 | 6 | .vs 7 | bin 8 | obj -------------------------------------------------------------------------------- /ImageOptimizer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.11.34909.225 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageOptimizer", "src\ImageOptimizer.csproj", "{CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageOptimizer.Test", "Test\ImageOptimizer.Test\ImageOptimizer.Test.csproj", "{C117F13F-2F5D-4434-AD47-71FA3B04390D}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|arm64 = Debug|arm64 14 | Debug|x86 = Debug|x86 15 | Release|Any CPU = Release|Any CPU 16 | Release|arm64 = Release|arm64 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Debug|arm64.ActiveCfg = Debug|arm64 23 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Debug|arm64.Build.0 = Debug|arm64 24 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Debug|x86.ActiveCfg = Debug|x86 25 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Debug|x86.Build.0 = Debug|x86 26 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Release|arm64.ActiveCfg = Release|arm64 29 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Release|arm64.Build.0 = Release|arm64 30 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Release|x86.ActiveCfg = Release|x86 31 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB}.Release|x86.Build.0 = Release|x86 32 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Debug|arm64.ActiveCfg = Debug|Any CPU 35 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Debug|arm64.Build.0 = Debug|Any CPU 36 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Debug|x86.ActiveCfg = Debug|Any CPU 37 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Debug|x86.Build.0 = Debug|Any CPU 38 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Release|Any CPU.Build.0 = Release|Any CPU 40 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Release|arm64.ActiveCfg = Release|Any CPU 41 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Release|arm64.Build.0 = Release|Any CPU 42 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Release|x86.ActiveCfg = Release|Any CPU 43 | {C117F13F-2F5D-4434-AD47-71FA3B04390D}.Release|x86.Build.0 = Release|Any CPU 44 | EndGlobalSection 45 | GlobalSection(SolutionProperties) = preSolution 46 | HideSolutionNode = FALSE 47 | EndGlobalSection 48 | EndGlobal 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015 Mads Kristensen 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/README.md -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/appveyor.yml -------------------------------------------------------------------------------- /art/context-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/art/context-menu.png -------------------------------------------------------------------------------- /art/output-window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/art/output-window.png -------------------------------------------------------------------------------- /art/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/art/resize.png -------------------------------------------------------------------------------- /src/Commands/CopyBase64Command.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Commands/CopyBase64Command.cs -------------------------------------------------------------------------------- /src/Commands/OptimizeLosslessCommand.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Commands/OptimizeLosslessCommand.cs -------------------------------------------------------------------------------- /src/Commands/OptimizeLossyCommand.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Commands/OptimizeLossyCommand.cs -------------------------------------------------------------------------------- /src/Commands/ResizeCommand.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Commands/ResizeCommand.cs -------------------------------------------------------------------------------- /src/Commands/WorkspaceOptimizeCommand.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Commands/WorkspaceOptimizeCommand.cs -------------------------------------------------------------------------------- /src/Commands/WorkspaceResizeCommand.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Commands/WorkspaceResizeCommand.cs -------------------------------------------------------------------------------- /src/Compression/Cache.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Compression/Cache.cs -------------------------------------------------------------------------------- /src/Compression/CompressionHandler.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Compression/CompressionHandler.cs -------------------------------------------------------------------------------- /src/Compression/CompressionResult.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Compression/CompressionResult.cs -------------------------------------------------------------------------------- /src/Compression/CompressionType.cs: -------------------------------------------------------------------------------- 1 | namespace MadsKristensen.ImageOptimizer 2 | { 3 | public enum CompressionType 4 | { 5 | Lossy, 6 | Lossless 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Compression/Compressor.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.IO; 3 | using System.Linq; 4 | using BracketPipe; 5 | 6 | namespace MadsKristensen.ImageOptimizer 7 | { 8 | public class Compressor 9 | { 10 | private static readonly string[] _supported = [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp"]; 11 | private static readonly string _cwd = Path.Combine(Path.GetDirectoryName(typeof(Compressor).Assembly.Location), @"Resources\Tools\"); 12 | 13 | public CompressionResult CompressFile(string fileName, CompressionType type) 14 | { 15 | var fileExtension = Path.GetExtension(fileName); 16 | var targetFile = Path.ChangeExtension(Path.GetTempFileName(), fileExtension); 17 | var stopwatch = Stopwatch.StartNew(); 18 | 19 | try 20 | { 21 | if (fileExtension.Equals(".svg", StringComparison.OrdinalIgnoreCase)) 22 | { 23 | var source = File.ReadAllText(fileName); 24 | string minified = Html.Minify(source); 25 | File.WriteAllText(targetFile, minified); 26 | } 27 | else 28 | { 29 | var start = new ProcessStartInfo("cmd") 30 | { 31 | WindowStyle = ProcessWindowStyle.Hidden, 32 | WorkingDirectory = _cwd, 33 | Arguments = GetArguments(fileName, targetFile, type), 34 | UseShellExecute = false, 35 | CreateNoWindow = true, 36 | }; 37 | 38 | using (var process = Process.Start(start)) 39 | { 40 | process.WaitForExit(); 41 | } 42 | } 43 | } 44 | catch (Exception) 45 | { 46 | return new CompressionResult(fileName, targetFile, stopwatch.Elapsed); 47 | } 48 | finally 49 | { 50 | stopwatch.Stop(); 51 | } 52 | 53 | return new CompressionResult(fileName, targetFile, stopwatch.Elapsed); 54 | } 55 | 56 | private static string GetArguments(string sourceFile, string targetFile, CompressionType type) 57 | { 58 | if (!Uri.IsWellFormedUriString(sourceFile, UriKind.RelativeOrAbsolute) && !File.Exists(sourceFile)) 59 | { 60 | return null; 61 | } 62 | 63 | var ext = Path.GetExtension(sourceFile).ToLowerInvariant(); ; 64 | 65 | switch (ext) 66 | { 67 | case ".png": 68 | case ".jpg": 69 | case ".jpeg": 70 | case ".webp": 71 | File.Copy(sourceFile, targetFile, true); 72 | return type is CompressionType.Lossy ? $"/c pingo -s4 -q \"{targetFile}\"" : $"/c pingo -lossless -s4 -q \"{targetFile}\""; 73 | 74 | case ".gif": 75 | return type is CompressionType.Lossy 76 | ? $"/c gifsicle -O3 --lossy \"{sourceFile}\" --output=\"{targetFile}\"" 77 | : $"/c gifsicle -O3 \"{sourceFile}\" --output=\"{targetFile}\""; 78 | 79 | default: 80 | return null; 81 | } 82 | } 83 | 84 | public static bool IsFileSupported(string fileName) 85 | { 86 | var ext = Path.GetExtension(fileName); 87 | return _supported.Any(s => s.Equals(ext, StringComparison.OrdinalIgnoreCase)); 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/ImageOptimizer.cs: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------------------ 2 | // 3 | // This file was generated by VSIX Synchronizer 4 | // 5 | // ------------------------------------------------------------------------------ 6 | namespace MadsKristensen.ImageOptimizer 7 | { 8 | using System; 9 | 10 | /// 11 | /// Helper class that exposes all GUIDs used across VS Package. 12 | /// 13 | internal sealed partial class PackageGuids 14 | { 15 | public const string guidImageOptimizerPkgString = "bf95754f-93d3-42ff-bfe3-e05d23188b08"; 16 | public static Guid guidImageOptimizerPkg = new Guid(guidImageOptimizerPkgString); 17 | 18 | public const string guidAutoloadImagesString = "ca4b4a68-7c99-489f-8245-8eb13f2ac2f8"; 19 | public static Guid guidAutoloadImages = new Guid(guidAutoloadImagesString); 20 | 21 | public const string guidAutoloadFoldersString = "ca4b4a68-7c99-489f-8245-8eb13f2ac2f9"; 22 | public static Guid guidAutoloadFolders = new Guid(guidAutoloadFoldersString); 23 | 24 | public const string guidBitmapOnlyUiContextString = "a076dc84-3c1c-45c2-ae98-f5f1a43ab976"; 25 | public static Guid guidBitmapOnlyUiContext = new Guid(guidBitmapOnlyUiContextString); 26 | 27 | public const string guidImageOptimizerCmdSetString = "d3662d85-2693-4ff5-97aa-3878453c787b"; 28 | public static Guid guidImageOptimizerCmdSet = new Guid(guidImageOptimizerCmdSetString); 29 | 30 | public const string guidWorkspaceExplorerToolWindowPackageCmdSetString = "cfb400f1-5c60-4f3c-856e-180d28def0b7"; 31 | public static Guid guidWorkspaceExplorerToolWindowPackageCmdSet = new Guid(guidWorkspaceExplorerToolWindowPackageCmdSetString); 32 | } 33 | /// 34 | /// Helper class that encapsulates all CommandIDs uses across VS Package. 35 | /// 36 | internal sealed partial class PackageIds 37 | { 38 | public const int MyMenu = 0x1010; 39 | public const int MyMenuGroup = 0x1020; 40 | public const int OptimizeGroup = 0x2000; 41 | public const int ClipboardGroup = 0x2100; 42 | public const int cmdOptimizelossy = 0x0100; 43 | public const int cmdOptimizelossless = 0x0150; 44 | public const int cmdCopyDataUri = 0x0200; 45 | public const int cmdResize = 0x0250; 46 | public const int WorkspaceContextMenuGroup = 0x0004; 47 | public const int WorkspaceContextMenu = 0x0005; 48 | public const int WorkspaceOptimizeGroup = 0x0006; 49 | public const int cmdWorkspaceOptimizelossless = 0x0007; 50 | public const int cmdWorkspaceOptimizelossy = 0x0008; 51 | public const int cmdWorkspaceResize = 0x0009; 52 | public const int idmWSE_ContextMenu = 0x0002; 53 | public const int idgWSE_ContextMenu_BuildDebugActions = 0x0014; 54 | public const int idgWSE_ContextMenu_FileContextActions = 0x0017; 55 | public const int idgAddNew_FilesFolders = 0x2201; 56 | public const int idgWSE_ContextMenu_ScopeActions = 0x0016; 57 | } 58 | } -------------------------------------------------------------------------------- /src/ImageOptimizer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(VisualStudioVersion) 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | latest 10 | 11 | 12 | 13 | Debug 14 | AnyCPU 15 | 2.0 16 | {CE4D2845-D1D2-4E6C-90C0-E7715FC0E1AB} 17 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 18 | Library 19 | Properties 20 | MadsKristensen.ImageOptimizer 21 | ImageOptimizer 22 | v4.8 23 | Program 24 | $(DevEnvDir)\devenv.exe 25 | /rootsuffix Exp 26 | Normal 27 | true 28 | v3 29 | 30 | 31 | true 32 | full 33 | false 34 | bin\Debug\ 35 | DEBUG;TRACE 36 | prompt 37 | 4 38 | 39 | 40 | pdbonly 41 | true 42 | bin\Release\ 43 | TRACE 44 | prompt 45 | 4 46 | false 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | True 73 | True 74 | ImageOptimizer.vsct 75 | 76 | 77 | 78 | 79 | 80 | 81 | ResizingDialog.xaml 82 | 83 | 84 | True 85 | True 86 | source.extension.vsixmanifest 87 | 88 | 89 | 90 | 91 | true 92 | 93 | 94 | Resources\LICENSE 95 | true 96 | 97 | 98 | true 99 | PreserveNewest 100 | 101 | 102 | Designer 103 | VsixManifestGenerator 104 | source.extension.cs 105 | 106 | 107 | 108 | 109 | Menus.ctmenu 110 | VsctGenerator 111 | ImageOptimizer.cs 112 | 113 | 114 | 115 | 116 | true 117 | PreserveNewest 118 | 119 | 120 | 121 | 122 | 0.7.7232.28997 123 | 124 | 125 | 17.0.527 126 | 127 | 128 | 2.5.192 129 | 130 | 131 | 16.3.43 132 | 133 | 134 | 17.12.2069 135 | runtime; build; native; contentfiles; analyzers 136 | all 137 | 138 | 139 | 140 | 141 | Designer 142 | MSBuild:Compile 143 | 144 | 145 | 146 | true 147 | 148 | 149 | 150 | 157 | -------------------------------------------------------------------------------- /src/ImageOptimizer.vsct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/ImageOptimizer.vsct -------------------------------------------------------------------------------- /src/ImageOptimizerPackage.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/ImageOptimizerPackage.cs -------------------------------------------------------------------------------- /src/Options/General.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Options/General.cs -------------------------------------------------------------------------------- /src/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Properties/AssemblyInfo.cs -------------------------------------------------------------------------------- /src/Resizing/ResizingDialog.xaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Resizing/ResizingDialog.xaml -------------------------------------------------------------------------------- /src/Resizing/ResizingDialog.xaml.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Resizing/ResizingDialog.xaml.cs -------------------------------------------------------------------------------- /src/Resources/Tools/gifsicle.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Resources/Tools/gifsicle.exe -------------------------------------------------------------------------------- /src/Resources/Tools/pingo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Resources/Tools/pingo.exe -------------------------------------------------------------------------------- /src/Resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/Resources/icon.png -------------------------------------------------------------------------------- /src/source.extension.cs: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------------------ 2 | // 3 | // This file was generated by VSIX Synchronizer 1.0.44 4 | // Available from https://marketplace.visualstudio.com/items?itemName=MadsKristensen.VsixSynchronizer64 5 | // 6 | // ------------------------------------------------------------------------------ 7 | namespace MadsKristensen.ImageOptimizer 8 | { 9 | internal sealed partial class Vsix 10 | { 11 | public const string Id = "fc4e241f-57de-4032-9c89-527984c0a0ae"; 12 | public const string Name = "Image Optimizer (64-bit)"; 13 | public const string Description = @"Uses industry standard tools to optimize any JPEG, PNG, WebP, SVG and Gifs - including animated Gifs. Can do both lossy and lossless optimization."; 14 | public const string Language = "en-US"; 15 | public const string Version = "6.0.900"; 16 | public const string Author = "Mads Kristensen"; 17 | public const string Tags = "image, png, gif, jpg, svg, optimization"; 18 | public const bool IsPreview = false; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/source.extension.vsixmanifest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/src/source.extension.vsixmanifest -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/gif/animation-cartoon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/gif/animation-cartoon.gif -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/gif/animation-road.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/gif/animation-road.gif -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/gif/animation-screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/gif/animation-screenshot.gif -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/gif/colors.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/gif/colors.gif -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/gif/line-drawing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/gif/line-drawing.gif -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/gif/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/gif/logo.gif -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/gif/screenshot-large.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/gif/screenshot-large.gif -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/jpg/clouds-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/jpg/clouds-original.jpg -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/jpg/dog1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/jpg/dog1.jpg -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/jpg/dog2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/jpg/dog2.jpg -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/jpg/dog3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/jpg/dog3.jpg -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/jpg/dog4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/jpg/dog4.jpg -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/jpg/dog5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/jpg/dog5.jpg -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/jpg/lake.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/jpg/lake.jpg -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/png/AddClass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/png/AddClass.png -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/png/Bower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/png/Bower.png -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/png/ducati.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/png/ducati.png -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/png/grunt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/png/grunt.png -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/png/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/png/logo.png -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/png/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/png/screenshot.png -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/svg/fail.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Normal 29 | Multiply 30 | Screen 31 | Darken 32 | Lighten 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/svg/success.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/svg/success.svg -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Artifacts/svg/success2.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Artifacts/svg/success2.svg -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Base64Test.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/Base64Test.cs -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/CacheTest.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/CacheTest.cs -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/CompressionResultTests.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/CompressionResultTests.cs -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/CompressionTest.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/test/ImageOptimizer.Test/CompressionTest.cs -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/ImageOptimizer.Test.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {C117F13F-2F5D-4434-AD47-71FA3B04390D} 7 | Library 8 | Properties 9 | ImageOptimizer.Test 10 | ImageOptimizer.Test 11 | v4.8 12 | 512 13 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 10.0 15 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 16 | $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages 17 | False 18 | UnitTest 19 | 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | 30 | 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | {ce4d2845-d1d2-4e6c-90c0-e7715fc0e1ab} 65 | ImageOptimizer 66 | 67 | 68 | 69 | 70 | PreserveNewest 71 | 72 | 73 | PreserveNewest 74 | 75 | 76 | PreserveNewest 77 | 78 | 79 | PreserveNewest 80 | 81 | 82 | PreserveNewest 83 | 84 | 85 | PreserveNewest 86 | 87 | 88 | PreserveNewest 89 | 90 | 91 | PreserveNewest 92 | 93 | 94 | PreserveNewest 95 | 96 | 97 | PreserveNewest 98 | 99 | 100 | PreserveNewest 101 | 102 | 103 | PreserveNewest 104 | 105 | 106 | PreserveNewest 107 | 108 | 109 | PreserveNewest 110 | 111 | 112 | PreserveNewest 113 | 114 | 115 | PreserveNewest 116 | 117 | 118 | PreserveNewest 119 | 120 | 121 | PreserveNewest 122 | 123 | 124 | PreserveNewest 125 | 126 | 127 | PreserveNewest 128 | 129 | 130 | PreserveNewest 131 | 132 | 133 | PreserveNewest 134 | 135 | 136 | PreserveNewest 137 | 138 | 139 | 140 | 141 | 142 | 143 | False 144 | 145 | 146 | False 147 | 148 | 149 | False 150 | 151 | 152 | False 153 | 154 | 155 | 156 | 157 | 158 | 159 | 166 | -------------------------------------------------------------------------------- /test/ImageOptimizer.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ImageOptimizer.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ImageOptimizer.Test")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("c117f13f-2f5d-4434-ad47-71fa3b04390d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /vs-publish.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ImageOptimizer/7c9c86f84fdc4d0fe720cb9461e9f294e3f7c548/vs-publish.json --------------------------------------------------------------------------------