Browse Source

Update to use new props/targets plus cleanup.

js/color-alpha-handling
James Jackson-South 5 years ago
parent
commit
472d639192
  1. 745
      .editorconfig
  2. 129
      Directory.Build.props
  3. 29
      Directory.Build.targets
  4. 147
      ImageSharp.sln
  5. 2
      shared-infrastructure
  6. 30
      src/Directory.Build.props
  7. 84
      src/Directory.Build.targets
  8. 39
      src/ImageSharp/ImageSharp.csproj
  9. BIN
      src/ImageSharp/Metadata/Profiles/Exif/DC-008-Translation-2019-E.pdf
  10. BIN
      src/ImageSharp/Metadata/Profiles/Exif/DC-X008-Translation-2019-E.pdf
  11. 28
      tests/Directory.Build.props
  12. 26
      tests/Directory.Build.targets
  13. 12
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpeg_ImageSpecific.cs
  14. 61
      tests/ImageSharp.Benchmarks/Codecs/MultiImageBenchmarkBase.cs
  15. 33
      tests/ImageSharp.Benchmarks/Config.cs
  16. 1
      tests/ImageSharp.Tests.ProfilingSandbox/ImageSharp.Tests.ProfilingSandbox.csproj
  17. 10
      tests/ImageSharp.Tests.ruleset
  18. 115
      tests/ImageSharp.Tests/FileTestBase.cs
  19. 37
      tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs
  20. 45
      tests/ImageSharp.Tests/Formats/ImageFormatManagerTests.cs
  21. 12
      tests/ImageSharp.Tests/GlobalSuppressions.cs
  22. 4
      tests/ImageSharp.Tests/ImageSharp.Tests.csproj
  23. 2
      tests/ImageSharp.Tests/TestImages.cs
  24. 16
      tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs

745
.editorconfig

@ -1,373 +1,436 @@
############################################################################### # Version: 1.6.2 (Using https://semver.org/)
# EditorConfig is awesome: http://EditorConfig.org # Updated: 2020-11-02
############################################################################### # See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
# See http://EditorConfig.org for more information about .editorconfig files.
############################################################################### ##########################################
# Top-most EditorConfig file # Common Settings
############################################################################### ##########################################
# This file is the top-most EditorConfig file
root = true root = true
############################################################################### # All Files
# Set default behavior to:
# a UTF-8 encoding,
# Unix-style line endings,
# a newline ending the file,
# 4 space indentation, and
# trimming of trailing whitespace
###############################################################################
[*] [*]
charset = utf-8 charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
############################################################################### ##########################################
# Set file behavior to: # File Extension Settings
# 2 space indentation ##########################################
###############################################################################
[*.{cmd,config,csproj,json,props,ps1,resx,sh,targets}]
indent_size = 2
############################################################################### # Visual Studio Solution Files
# Set file behavior to:
# Windows-style line endings, and
# tabular indentation
###############################################################################
[*.sln] [*.sln]
indent_style = tab
# Visual Studio XML Project Files
[*.{csproj,vbproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# T4 Templates Files
[*.{tt,ttinclude}]
end_of_line = crlf end_of_line = crlf
# XML Configuration Files
[*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}]
indent_size = 2
# JSON Files
[*.{json,json5,webmanifest}]
indent_size = 2
# YAML Files
[*.{yml,yaml}]
indent_size = 2
# Markdown Files
[*.md]
trim_trailing_whitespace = false
# Web Files
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue}]
indent_size = 2
# Batch Files
[*.{cmd,bat}]
end_of_line = crlf
# Makefiles
[Makefile]
indent_style = tab indent_style = tab
############################################################################### ##########################################
# Set dotnet naming rules to: # File Header (Uncomment to support file headers)
# suggest async members be pascal case suffixed with Async # https://docs.microsoft.com/visualstudio/ide/reference/add-file-header
# suggest const declarations be pascal case ##########################################
# suggest interfaces be pascal case prefixed with I
# suggest parameters be camel case
# suggest private and internal static fields be camel case
# suggest private and internal fields be camel case
# suggest public and protected declarations be pascal case
# suggest static readonly declarations be pascal case
# suggest type parameters be prefixed with T
###############################################################################
[*.cs]
dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.severity = suggestion
dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.style = pascal_case_suffixed_with_async
dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.symbols = async_members
dotnet_naming_rule.const_declarations_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.const_declarations_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.const_declarations_should_be_pascal_case.symbols = const_declarations
dotnet_naming_rule.interfaces_should_be_pascal_case_prefixed_with_i.severity = suggestion
dotnet_naming_rule.interfaces_should_be_pascal_case_prefixed_with_i.style = pascal_case_prefixed_with_i
dotnet_naming_rule.interfaces_should_be_pascal_case_prefixed_with_i.symbols = interfaces
dotnet_naming_rule.parameters_should_be_camel_case.severity = suggestion
dotnet_naming_rule.parameters_should_be_camel_case.style = camel_case
dotnet_naming_rule.parameters_should_be_camel_case.symbols = parameters
dotnet_naming_rule.private_and_internal_static_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.private_and_internal_static_fields_should_be_camel_case.style = camel_case
dotnet_naming_rule.private_and_internal_static_fields_should_be_camel_case.symbols = private_and_internal_static_fields
dotnet_naming_rule.private_and_internal_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.private_and_internal_fields_should_be_camel_case.style = camel_case
dotnet_naming_rule.private_and_internal_fields_should_be_camel_case.symbols = private_and_internal_fields
dotnet_naming_rule.public_and_protected_declarations_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.public_and_protected_declarations_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.public_and_protected_declarations_should_be_pascal_case.symbols = public_and_protected_declarations
dotnet_naming_symbols.public_and_protected_declarations.applicable_kinds = method, field, event, property
dotnet_naming_rule.static_readonly_declarations_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.static_readonly_declarations_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.static_readonly_declarations_should_be_pascal_case.symbols = static_readonly_declarations
dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.severity = suggestion
dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.style = pascal_case_prefixed_with_t
dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.symbols = type_parameters
###############################################################################
# Set dotnet naming styles to define:
# camel case
# pascal case
# pascal case suffixed with Async
# pascal case prefixed with I
# pascal case prefixed with T
###############################################################################
[*.cs]
dotnet_naming_style.camel_case.capitalization = camel_case
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_style.pascal_case_suffixed_with_async.capitalization = pascal_case
dotnet_naming_style.pascal_case_suffixed_with_async.required_suffix = Async
dotnet_naming_style.pascal_case_prefixed_with_i.capitalization = pascal_case
dotnet_naming_style.pascal_case_prefixed_with_i.required_prefix = I
dotnet_naming_style.pascal_case_prefixed_with_t.capitalization = pascal_case
dotnet_naming_style.pascal_case_prefixed_with_t.required_prefix = T
###############################################################################
# Set dotnet naming symbols to:
# async members
# const declarations
# interfaces
# private and internal fields
# private and internal static fields
# public and protected declarations
# static readonly declarations
# type parameters
###############################################################################
[*.cs]
dotnet_naming_symbols.async_members.required_modifiers = async
dotnet_naming_symbols.const_declarations.required_modifiers = const
dotnet_naming_symbols.interfaces.applicable_kinds = interface
dotnet_naming_symbols.parameters.applicable_kinds = parameter
dotnet_naming_symbols.private_and_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_symbols.private_and_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_and_internal_static_fields.applicable_accessibilities = private, internal
dotnet_naming_symbols.private_and_internal_static_fields.applicable_kinds = field
dotnet_naming_symbols.private_and_internal_static_fields.required_modifiers = static
dotnet_naming_symbols.public_and_protected_declarations.applicable_accessibilities = public, protected
dotnet_naming_symbols.static_readonly_declarations.required_modifiers = static, readonly
dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
###############################################################################
# Set dotnet sort options to:
# do not separate import directives into groups, and
# sort system directives first
###############################################################################
[*.cs]
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
############################################################################### # [*.{cs,csx,cake,vb,vbx,tt,ttinclude}]
# Set dotnet style options to: file_header_template = Copyright (c) Six Labors.\nLicensed under the Apache License, Version 2.0.
# suggest null-coalescing expressions,
# suggest collection-initializers,
# suggest explicit tuple names,
# suggest null-propogation
# suggest object-initializers,
# generate parentheses in arithmetic binary operators for clarity,
# generate parentheses in other binary operators for clarity,
# don't generate parentheses in other operators if unnecessary,
# generate parentheses in relational binary operators for clarity,
# warn when not using predefined-types for locals, parameters, and members,
# generate predefined-types of type names for member access,
# generate auto properties,
# suggest compound assignment,
# generate conditional expression over assignment,
# generate conditional expression over return,
# suggest inferred anonymous types,
# suggest inferred tuple names,
# suggest 'is null' checks over '== null',
# don't generate 'this.' and 'Me.' for events,
# warn when not using 'this.' and 'Me.' for fields,
# warn when not using 'this.' and 'Me.' for methods,
# warn when not using 'this.' and 'Me.' for properties,
# suggest readonly fields, and
# generate accessibility modifiers for non interface members
###############################################################################
[*.cs]
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
dotnet_style_predefined_type_for_locals_parameters_members = true:warning # SA1636: File header copyright text should match
dotnet_style_predefined_type_for_member_access = true:silent # Justification: .editorconfig supports file headers. If this is changed to a value other than "none", a stylecop.json file will need to added to the project.
# dotnet_diagnostic.SA1636.severity = none
dotnet_style_prefer_auto_properties = true:silent ##########################################
dotnet_style_prefer_compound_assignment = true:suggestion # .NET Language Conventions
dotnet_style_prefer_conditional_expression_over_assignment = true:silent # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions
dotnet_style_prefer_conditional_expression_over_return = true:silent ##########################################
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_qualification_for_event = false:silent # .NET Code Style Settings
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#net-code-style-settings
[*.{cs,csx,cake,vb,vbx}]
# "this." and "Me." qualifiers
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#this-and-me
dotnet_style_qualification_for_field = true:warning dotnet_style_qualification_for_field = true:warning
dotnet_style_qualification_for_method = true:warning
dotnet_style_qualification_for_property = true:warning dotnet_style_qualification_for_property = true:warning
dotnet_style_qualification_for_method = true:warning
dotnet_style_readonly_field = true:suggestion dotnet_style_qualification_for_event = true:warning
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent # Language keywords instead of framework type names for type references
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#language-keywords
############################################################################### dotnet_style_predefined_type_for_locals_parameters_members = true:warning
# Set dotnet style options to: dotnet_style_predefined_type_for_member_access = true:warning
# suggest removing all unused parameters # Modifier preferences
############################################################################### # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#normalize-modifiers
[*.cs] dotnet_style_require_accessibility_modifiers = always:warning
dotnet_code_quality_unused_parameters = all:suggestion csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:warning
############################################################################### dotnet_style_readonly_field = true:warning
# Set csharp indent options to: # Parentheses preferences
# indent block contents, # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parentheses-preferences
# not indent braces, dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
# indent case contents, dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
# not indent case contents when block, dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
# indent labels one less than the current, and dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
# indent switch labels # Expression-level preferences
############################################################################### # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
[*.cs] dotnet_style_object_initializer = true:warning
csharp_indent_block_contents = true dotnet_style_collection_initializer = true:warning
csharp_indent_braces = false dotnet_style_explicit_tuple_names = true:warning
csharp_indent_case_contents = true dotnet_style_prefer_inferred_tuple_names = true:warning
csharp_indent_case_contents_when_block = false dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
csharp_indent_labels = one_less_than_current dotnet_style_prefer_auto_properties = true:warning
csharp_indent_switch_labels = true dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion
############################################################################### dotnet_style_prefer_conditional_expression_over_return = false:suggestion
# Set csharp new-line options to: dotnet_style_prefer_compound_assignment = true:warning
# insert a new-line before "catch", # Null-checking preferences
# insert a new-line before "else", # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#null-checking-preferences
# insert a new-line before "finally", dotnet_style_coalesce_expression = true:warning
# insert a new-line before members in anonymous-types, dotnet_style_null_propagation = true:warning
# insert a new-line before members in object-initializers, and # Parameter preferences
# insert a new-line before all open braces # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parameter-preferences
############################################################################### dotnet_code_quality_unused_parameters = all:warning
[*.cs] # More style options (Undocumented)
csharp_new_line_before_catch = true # https://github.com/MicrosoftDocs/visualstudio-docs/issues/3641
dotnet_style_operator_placement_when_wrapping = end_of_line
# https://github.com/dotnet/roslyn/pull/40070
dotnet_style_prefer_simplified_interpolation = true:warning
# C# Code Style Settings
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-code-style-settings
[*.{cs,csx,cake}]
# Implicit and explicit types
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#implicit-and-explicit-types
csharp_style_var_for_built_in_types = never
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = false:warning
# Expression-bodied members
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-bodied-members
csharp_style_expression_bodied_methods = true:warning
csharp_style_expression_bodied_constructors = true:warning
csharp_style_expression_bodied_operators = true:warning
csharp_style_expression_bodied_properties = true:warning
csharp_style_expression_bodied_indexers = true:warning
csharp_style_expression_bodied_accessors = true:warning
csharp_style_expression_bodied_lambdas = true:warning
csharp_style_expression_bodied_local_functions = true:warning
# Pattern matching
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#pattern-matching
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
csharp_style_pattern_matching_over_as_with_null_check = true:warning
# Inlined variable declarations
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#inlined-variable-declarations
csharp_style_inlined_variable_declaration = true:warning
# Expression-level preferences
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
csharp_prefer_simple_default_expression = true:warning
# "Null" checking preferences
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-null-checking-preferences
csharp_style_throw_expression = true:warning
csharp_style_conditional_delegate_call = true:warning
# Code block preferences
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#code-block-preferences
csharp_prefer_braces = true:warning
# Unused value preferences
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#unused-value-preferences
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
# Index and range preferences
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences
csharp_style_prefer_index_operator = true:warning
csharp_style_prefer_range_operator = true:warning
# Miscellaneous preferences
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences
csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_pattern_local_over_anonymous_function = true:warning
csharp_using_directive_placement = outside_namespace:warning
csharp_prefer_static_local_function = true:warning
csharp_prefer_simple_using_statement = true:suggestion
##########################################
# .NET Formatting Conventions
# https://docs.microsoft.com/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions
##########################################
# Organize usings
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#organize-using-directives
dotnet_sort_system_directives_first = true
# Newline options
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#new-line-options
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_open_brace = all csharp_new_line_between_query_expression_clauses = true
# Indentation options
############################################################################### # https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#indentation-options
# Set csharp preserve options to: csharp_indent_case_contents = true
# preserve single-line blocks, and csharp_indent_switch_labels = true
# preserve single-line statements csharp_indent_labels = no_change
############################################################################### csharp_indent_block_contents = true
[*.cs] csharp_indent_braces = false
csharp_preserve_single_line_blocks = true csharp_indent_case_contents_when_block = false
csharp_preserve_single_line_statements = true # Spacing options
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#spacing-options
###############################################################################
# Set csharp space options to:
# remove any space after a cast,
# add a space after the colon in an inheritance clause,
# add a space after a comma,
# remove any space after a dot,
# add a space after keywords in control flow statements,
# add a space after a semicolon in a "for" statement,
# add a space before and after binary operators,
# remove space around declaration statements,
# add a space before the colon in an inheritance clause,
# remove any space before a comma,
# remove any space before a dot,
# remove any space before an open square-bracket,
# remove any space before a semicolon in a "for" statement,
# remove any space between empty square-brackets,
# remove any space between a method call's empty parameter list parenthesis,
# remove any space between a method call's name and its opening parenthesis,
# remove any space between a method call's parameter list parenthesis,
# remove any space between a method declaration's empty parameter list parenthesis,
# remove any space between a method declaration's name and its openening parenthesis,
# remove any space between a method declaration's parameter list parenthesis,
# remove any space between parentheses, and
# remove any space between square brackets
###############################################################################
[*.cs]
csharp_space_after_cast = false csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true csharp_space_between_parentheses = false
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true csharp_space_before_colon_in_inheritance_clause = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_after_comma = true
csharp_space_before_comma = false csharp_space_before_comma = false
csharp_space_after_dot = false
csharp_space_before_dot = false csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false csharp_space_after_semicolon_in_for_statement = true
csharp_space_before_semicolon_in_for_statement = false csharp_space_before_semicolon_in_for_statement = false
csharp_space_around_declaration_statements = false
csharp_space_before_open_square_brackets = false
csharp_space_between_empty_square_brackets = false csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false csharp_space_between_square_brackets = false
# Wrapping options
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#wrap-options
csharp_preserve_single_line_statements = false
csharp_preserve_single_line_blocks = true
############################################################################### ##########################################
# Set csharp style options to: # .NET Naming Conventions
# generate braces, # https://docs.microsoft.com/visualstudio/ide/editorconfig-naming-conventions
# suggest simple default expressions, ##########################################
# generate a preferred modifier order,
# suggest conditional delegate calls, [*.{cs,csx,cake,vb,vbx}]
# suggest deconstructed variable declarations,
# generate expression-bodied accessors, ##########################################
# generate expression-bodied constructors, # Styles
# generate expression-bodied indexers, ##########################################
# generate expression-bodied lambdas,
# generate expression-bodied methods, # camel_case_style - Define the camelCase style
# generate expression-bodied operators, dotnet_naming_style.camel_case_style.capitalization = camel_case
# generate expression-bodied properties, # pascal_case_style - Define the PascalCase style
# suggest inlined variable declarations, dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# suggest local over anonymous functions, # first_upper_style - The first character must start with an upper-case character
# suggest pattern-matching over "as" with "null" check, dotnet_naming_style.first_upper_style.capitalization = first_word_upper
# suggest pattern-matching over "is" with "cast" check, # prefix_interface_with_i_style - Interfaces must be PascalCase and the first character of an interface must be an 'I'
# suggest throw expressions, dotnet_naming_style.prefix_interface_with_i_style.capitalization = pascal_case
# generate a discard variable for unused value expression statements, dotnet_naming_style.prefix_interface_with_i_style.required_prefix = I
# suggest a discard variable for unused assignments, # prefix_type_parameters_with_t_style - Generic Type Parameters must be PascalCase and the first character must be a 'T'
# warn when using var for built-in types, dotnet_naming_style.prefix_type_parameters_with_t_style.capitalization = pascal_case
# warn when using var when the type is not apparent, and dotnet_naming_style.prefix_type_parameters_with_t_style.required_prefix = T
# warn when not using var when the type is apparent # disallowed_style - Anything that has this style applied is marked as disallowed
# warn when using simplified "using" declaration dotnet_naming_style.disallowed_style.capitalization = pascal_case
############################################################################### dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____
[*.cs] dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____
csharp_prefer_braces = true:silent # internal_error_style - This style should never occur... if it does, it indicates a bug in file or in the parser using the file
csharp_prefer_simple_default_expression = true:suggestion dotnet_naming_style.internal_error_style.capitalization = pascal_case
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent dotnet_naming_style.internal_error_style.required_prefix = ____INTERNAL_ERROR____
dotnet_naming_style.internal_error_style.required_suffix = ____INTERNAL_ERROR____
csharp_style_conditional_delegate_call = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion ##########################################
# .NET Design Guideline Field Naming Rules
csharp_style_expression_bodied_accessors = true:silent # Naming rules for fields follow the .NET Framework design guidelines
csharp_style_expression_bodied_constructors = true:silent # https://docs.microsoft.com/dotnet/standard/design-guidelines/index
csharp_style_expression_bodied_indexers = true:silent ##########################################
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_methods = true:silent # All public/protected/protected_internal constant fields must be PascalCase
csharp_style_expression_bodied_operators = true:silent # https://docs.microsoft.com/dotnet/standard/design-guidelines/field
csharp_style_expression_bodied_properties = true:silent dotnet_naming_symbols.public_protected_constant_fields_group.applicable_accessibilities = public, protected, protected_internal
dotnet_naming_symbols.public_protected_constant_fields_group.required_modifiers = const
csharp_style_inlined_variable_declaration = true:suggestion dotnet_naming_symbols.public_protected_constant_fields_group.applicable_kinds = field
dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.symbols = public_protected_constant_fields_group
csharp_style_pattern_local_over_anonymous_function = true:suggestion dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.style = pascal_case_style
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.severity = warning
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
# All public/protected/protected_internal static readonly fields must be PascalCase
csharp_style_throw_expression = true:suggestion # https://docs.microsoft.com/dotnet/standard/design-guidelines/field
dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_accessibilities = public, protected, protected_internal
csharp_style_unused_value_expression_statement_preference = discard_variable:silent dotnet_naming_symbols.public_protected_static_readonly_fields_group.required_modifiers = static, readonly
csharp_style_unused_value_assignment_preference = discard_variable:suggestion dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_kinds = field
dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.symbols = public_protected_static_readonly_fields_group
csharp_style_var_for_built_in_types = never dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style
csharp_style_var_when_type_is_apparent = true:warning dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.severity = warning
csharp_style_var_elsewhere = false:warning
# No other public/protected/protected_internal fields are allowed
# https://docs.microsoft.com/dotnet/standard/design-guidelines/field
dotnet_naming_symbols.other_public_protected_fields_group.applicable_accessibilities = public, protected, protected_internal
dotnet_naming_symbols.other_public_protected_fields_group.applicable_kinds = field
dotnet_naming_rule.other_public_protected_fields_disallowed_rule.symbols = other_public_protected_fields_group
dotnet_naming_rule.other_public_protected_fields_disallowed_rule.style = disallowed_style
dotnet_naming_rule.other_public_protected_fields_disallowed_rule.severity = error
##########################################
# StyleCop Field Naming Rules
# Naming rules for fields follow the StyleCop analyzers
# This does not override any rules using disallowed_style above
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers
##########################################
# All constant fields must be PascalCase
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1303.md
dotnet_naming_symbols.stylecop_constant_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private
dotnet_naming_symbols.stylecop_constant_fields_group.required_modifiers = const
dotnet_naming_symbols.stylecop_constant_fields_group.applicable_kinds = field
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.symbols = stylecop_constant_fields_group
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.style = pascal_case_style
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.severity = warning
# All static readonly fields must be PascalCase
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1311.md
dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private
dotnet_naming_symbols.stylecop_static_readonly_fields_group.required_modifiers = static, readonly
dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_kinds = field
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.symbols = stylecop_static_readonly_fields_group
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.severity = warning
# No non-private instance fields are allowed
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md
dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected
dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_kinds = field
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.symbols = stylecop_fields_must_be_private_group
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.style = disallowed_style
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.severity = error
# Private fields must be camelCase
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1306.md
dotnet_naming_symbols.stylecop_private_fields_group.applicable_accessibilities = private
dotnet_naming_symbols.stylecop_private_fields_group.applicable_kinds = field
dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.symbols = stylecop_private_fields_group
dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.style = camel_case_style
dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.severity = warning
# Local variables must be camelCase
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1312.md
dotnet_naming_symbols.stylecop_local_fields_group.applicable_accessibilities = local
dotnet_naming_symbols.stylecop_local_fields_group.applicable_kinds = local
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.symbols = stylecop_local_fields_group
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.style = camel_case_style
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.severity = silent
# This rule should never fire. However, it's included for at least two purposes:
# First, it helps to understand, reason about, and root-case certain types of issues, such as bugs in .editorconfig parsers.
# Second, it helps to raise immediate awareness if a new field type is added (as occurred recently in C#).
dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_accessibilities = *
dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_kinds = field
dotnet_naming_rule.sanity_check_uncovered_field_case_rule.symbols = sanity_check_uncovered_field_case_group
dotnet_naming_rule.sanity_check_uncovered_field_case_rule.style = internal_error_style
dotnet_naming_rule.sanity_check_uncovered_field_case_rule.severity = error
##########################################
# Other Naming Rules
##########################################
# All of the following must be PascalCase:
# - Namespaces
# https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-namespaces
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1300.md
# - Classes and Enumerations
# https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1300.md
# - Delegates
# https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces#names-of-common-types
# - Constructors, Properties, Events, Methods
# https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-type-members
dotnet_naming_symbols.element_group.applicable_kinds = namespace, class, enum, struct, delegate, event, method, property
dotnet_naming_rule.element_rule.symbols = element_group
dotnet_naming_rule.element_rule.style = pascal_case_style
dotnet_naming_rule.element_rule.severity = warning
# Interfaces use PascalCase and are prefixed with uppercase 'I'
# https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces
dotnet_naming_symbols.interface_group.applicable_kinds = interface
dotnet_naming_rule.interface_rule.symbols = interface_group
dotnet_naming_rule.interface_rule.style = prefix_interface_with_i_style
dotnet_naming_rule.interface_rule.severity = warning
# Generics Type Parameters use PascalCase and are prefixed with uppercase 'T'
# https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces
dotnet_naming_symbols.type_parameter_group.applicable_kinds = type_parameter
dotnet_naming_rule.type_parameter_rule.symbols = type_parameter_group
dotnet_naming_rule.type_parameter_rule.style = prefix_type_parameters_with_t_style
dotnet_naming_rule.type_parameter_rule.severity = warning
# Function parameters use camelCase
# https://docs.microsoft.com/dotnet/standard/design-guidelines/naming-parameters
dotnet_naming_symbols.parameters_group.applicable_kinds = parameter
dotnet_naming_rule.parameters_rule.symbols = parameters_group
dotnet_naming_rule.parameters_rule.style = camel_case_style
dotnet_naming_rule.parameters_rule.severity = warning
##########################################
# License
##########################################
# The following applies as to the .editorconfig file ONLY, and is
# included below for reference, per the requirements of the license
# corresponding to this .editorconfig file.
# See: https://github.com/RehanSaeed/EditorConfig
#
# MIT License
#
# Copyright (c) 2017-2019 Muhammad Rehan Saeed
# Copyright (c) 2019 Henry Gabryjelski
#
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute,
# sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject
# to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
##########################################

129
Directory.Build.props

@ -10,133 +10,12 @@
that is done by the file that imports us. that is done by the file that imports us.
--> -->
<!-- Default settings that are used by other settings -->
<PropertyGroup> <PropertyGroup>
<BaseArtifactsPath>$(MSBuildThisFileDirectory)artifacts/</BaseArtifactsPath> <!-- This MUST be defined before importing props. -->
<BaseArtifactsPathSuffix>$(SixLaborsProjectCategory)/$(MSBuildProjectName)</BaseArtifactsPathSuffix> <SixLaborsSolutionDirectory>$(MSBuildThisFileDirectory)</SixLaborsSolutionDirectory>
<RepositoryUrl Condition="'$(RepositoryUrl)' == ''">https://github.com/SixLabors/ImageSharp/</RepositoryUrl>
<RunSettingsFilePath>$(MSBuildThisFileDirectory)/.runsettings</RunSettingsFilePath>
</PropertyGroup> </PropertyGroup>
<!-- Default settings that explicitly differ from the Sdk.props defaults --> <!-- Import the shared global .props file -->
<PropertyGroup> <Import Project="$(MSBuildThisFileDirectory)shared-infrastructure\msbuild\props\SixLabors.Global.props" />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<BaseIntermediateOutputPath>$(BaseArtifactsPath)obj/$(BaseArtifactsPathSuffix)/</BaseIntermediateOutputPath>
<DebugType>portable</DebugType>
<DebugType Condition="'$(codecov)' != ''">full</DebugType>
<NullableContextOptions>disable</NullableContextOptions>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>
<!--
https://apisof.net/
+===================+=======+==========+=====================+=============+=================+====================+==============+=========+============|
| SUPPORTS | MATHF | HASHCODE | EXTENDED_INTRINSICS | SPAN_STREAM | ENCODING_STRING | RUNTIME_INTRINSICS | CODECOVERAGE | HOTPATH | CREATESPAN |
+===================+=======+==========+=====================+=============+=================+====================+==============+=========|============|
| netcoreapp3.1 | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| netcoreapp2.1 | Y | Y | Y | Y | Y | N | Y | N | Y |
| netcoreapp2.0 | Y | N | N | N | N | N | Y | N | Y |
| netstandard2.1 | Y | Y | N | Y | Y | N | Y | N | Y |
| netstandard2.0 | N | N | N | N | N | N | Y | N | N |
| netstandard1.3 | N | N | N | N | N | N | N | N | N |
| net472 | N | N | Y | N | N | N | Y | N | N |
+===================+=======+==========+=====================+=============+=================+====================+==============+=========|============|
-->
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_SPAN_STREAM</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_ENCODING_STRING</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_RUNTIME_INTRINSICS</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_HOTPATH</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_SPAN_STREAM</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_ENCODING_STRING</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_SPAN_STREAM</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_ENCODING_STRING</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
<DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants>
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
</PropertyGroup>
<!-- Default settings that explicitly differ from the Sdk.targets defaults-->
<PropertyGroup>
<Authors>Six Labors and contributors</Authors>
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)/</BaseOutputPath>
<Company>Six Labors</Company>
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(BaseArtifactsPathSuffix)/$(Configuration)/</PackageOutputPath>
<Product>SixLabors.ImageSharp</Product>
<VersionPrefix>0.0.1</VersionPrefix>
<VersionPrefix Condition="'$(packageversion)' != ''">$(PackageVersion)</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
<!--MinVer Properties for versioning-->
<PropertyGroup>
<MinVerTagPrefix>v</MinVerTagPrefix>
<MinVerVerbosity>normal</MinVerVerbosity>
</PropertyGroup>
<!-- Default settings that are otherwise undefined -->
<PropertyGroup>
<Copyright>Copyright © Six Labors</Copyright>
<Features>strict;IOperation</Features>
<HighEntropyVA>true</HighEntropyVA>
<LangVersion>8.0</LangVersion>
<NeutralLanguage>en</NeutralLanguage>
<OverwriteReadOnlyFiles>true</OverwriteReadOnlyFiles>
<PackageIcon>sixlabors.imagesharp.128.png</PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<RepositoryType>git</RepositoryType>
<RestoreSources>
https://www.myget.org/F/sixlabors/api/v3/index.json;
https://api.nuget.org/v3/index.json;
<!-- Contains RemoteExecutor. Taken from: https://github.com/dotnet/runtime/blob/master/NuGet.config -->
https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;
https://www.myget.org/F/coverlet-dev/api/v3/index.json;
</RestoreSources>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)shared-infrastructure/SixLabors.snk</AssemblyOriginatorKeyFile>
<SixLaborsPublicKey>00240000048000009400000006020000002400005253413100040000010001000147e6fe6766715eec6cfed61f1e7dcdbf69748a3e355c67e9d8dfd953acab1d5e012ba34b23308166fdc61ee1d0390d5f36d814a6091dd4b5ed9eda5a26afced924c683b4bfb4b3d64b0586a57eff9f02b1f84e3cb0ddd518bd1697f2c84dcbb97eb8bb5c7801be12112ed0ec86db934b0e9a5171e6bb1384b6d2f7d54dfa97</SixLaborsPublicKey>
<UseSharedCompilation>true</UseSharedCompilation>
</PropertyGroup>
<!-- Package references and additional files which are consumed by all projects -->
<ItemGroup>
<PackageReference Include="Microsoft.Net.Compilers.Toolset" IsImplicitlyDefined="true" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" IsImplicitlyDefined="true" />
<PackageReference Include="StyleCop.Analyzers" IsImplicitlyDefined="true" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)shared-infrastructure\stylecop.json" />
<!--NuGet package icon source-->
<None Include="$(MSBuildThisFileDirectory)shared-infrastructure\branding\icons\imagesharp\sixlabors.imagesharp.128.png" Pack="true" PackagePath="" />
</ItemGroup>
</Project> </Project>

29
Directory.Build.targets

@ -5,35 +5,12 @@
Directory.Build.targets is automatically picked up and imported by Directory.Build.targets is automatically picked up and imported by
Microsoft.Common.targets. This file needs to exist, even if empty so that Microsoft.Common.targets. This file needs to exist, even if empty so that
files in the parent directory tree, with the same name, are not imported files in the parent directory tree, with the same name, are not imported
instead. The import fairly late and most other props/targets will have been instead. They import fairly late and most other props/targets will have been
imported beforehand. We also don't need to add ourselves to imported beforehand. We also don't need to add ourselves to
MSBuildAllProjects, as that is done by the file that imports us. MSBuildAllProjects, as that is done by the file that imports us.
--> -->
<!-- Settings that append the existing setting value --> <!-- Import the shared global .props file -->
<PropertyGroup> <Import Project="$(MSBuildThisFileDirectory)shared-infrastructure\msbuild\targets\SixLabors.Global.targets"/>
<DefineConstants>$(DefineConstants);$(OS)</DefineConstants>
</PropertyGroup>
<!-- Package versions for package references across all projects -->
<ItemGroup>
<!--Global Dependencies-->
<PackageReference Update="Microsoft.Net.Compilers.Toolset" PrivateAssets="All" Version="3.7.0" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
<PackageReference Update="StyleCop.Analyzers" PrivateAssets="All" Version="1.1.118" />
<!--Src Dependencies-->
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Update="MinVer" PrivateAssets="All" Version="2.3.1" />
<PackageReference Update="System.Buffers" Version="4.5.1" />
<PackageReference Update="System.IO.Compression" Version="4.3.0" />
<PackageReference Update="System.IO.UnmanagedMemoryStream" Version="4.3.0" />
<PackageReference Update="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Update="System.Memory" Version="4.5.4" />
<PackageReference Update="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" />
<PackageReference Update="System.Threading.Tasks.Parallel" Version="4.3.0" />
<PackageReference Update="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
</Project> </Project>

147
ImageSharp.sln

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 16
VisualStudioVersion = 16.0.28902.138 VisualStudioVersion = 16.0.28902.138
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_root", "_root", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig .editorconfig = .editorconfig
.gitattributes = .gitattributes .gitattributes = .gitattributes
@ -15,7 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ci-test.ps1 = ci-test.ps1 ci-test.ps1 = ci-test.ps1
Directory.Build.props = Directory.Build.props Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets Directory.Build.targets = Directory.Build.targets
GitVersion.yml = GitVersion.yml
LICENSE = LICENSE LICENSE = LICENSE
README.md = README.md README.md = README.md
EndProjectSection EndProjectSection
@ -46,6 +45,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{56801022
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
tests\Directory.Build.props = tests\Directory.Build.props tests\Directory.Build.props = tests\Directory.Build.props
tests\Directory.Build.targets = tests\Directory.Build.targets tests\Directory.Build.targets = tests\Directory.Build.targets
tests\ImageSharp.Tests.ruleset = tests\ImageSharp.Tests.ruleset
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Images", "Images", "{FA55F5DE-11A6-487D-ABA4-BC93A02717DD}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Images", "Images", "{FA55F5DE-11A6-487D-ABA4-BC93A02717DD}"
@ -54,16 +54,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Input", "Input", "{9DA226A1
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bmp", "Bmp", "{1A82C5F6-90E0-4E97-BE16-A825C046B493}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bmp", "Bmp", "{1A82C5F6-90E0-4E97-BE16-A825C046B493}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
tests\Images\Input\Bmp\9S.BMP = tests\Images\Input\Bmp\9S.BMP
tests\Images\Input\Bmp\ba-bm.bmp = tests\Images\Input\Bmp\ba-bm.bmp
tests\Images\Input\Bmp\BitmapCoreHeaderQR.bmp = tests\Images\Input\Bmp\BitmapCoreHeaderQR.bmp tests\Images\Input\Bmp\BitmapCoreHeaderQR.bmp = tests\Images\Input\Bmp\BitmapCoreHeaderQR.bmp
tests\Images\Input\Bmp\BITMAPV5HEADER.bmp = tests\Images\Input\Bmp\BITMAPV5HEADER.bmp tests\Images\Input\Bmp\BITMAPV5HEADER.bmp = tests\Images\Input\Bmp\BITMAPV5HEADER.bmp
tests\Images\Input\Bmp\Car.bmp = tests\Images\Input\Bmp\Car.bmp tests\Images\Input\Bmp\Car.bmp = tests\Images\Input\Bmp\Car.bmp
tests\Images\Input\Bmp\DIAMOND.BMP = tests\Images\Input\Bmp\DIAMOND.BMP
tests\Images\Input\Bmp\F.bmp = tests\Images\Input\Bmp\F.bmp tests\Images\Input\Bmp\F.bmp = tests\Images\Input\Bmp\F.bmp
tests\Images\Input\Bmp\GMARBLE.BMP = tests\Images\Input\Bmp\GMARBLE.BMP
tests\Images\Input\Bmp\invalidPaletteSize.bmp = tests\Images\Input\Bmp\invalidPaletteSize.bmp
tests\Images\Input\Bmp\issue735.bmp = tests\Images\Input\Bmp\issue735.bmp tests\Images\Input\Bmp\issue735.bmp = tests\Images\Input\Bmp\issue735.bmp
tests\Images\Input\Bmp\neg_height.bmp = tests\Images\Input\Bmp\neg_height.bmp tests\Images\Input\Bmp\neg_height.bmp = tests\Images\Input\Bmp\neg_height.bmp
tests\Images\Input\Bmp\pal1.bmp = tests\Images\Input\Bmp\pal1.bmp tests\Images\Input\Bmp\pal1.bmp = tests\Images\Input\Bmp\pal1.bmp
tests\Images\Input\Bmp\pal1p1.bmp = tests\Images\Input\Bmp\pal1p1.bmp tests\Images\Input\Bmp\pal1p1.bmp = tests\Images\Input\Bmp\pal1p1.bmp
tests\Images\Input\Bmp\pal4.bmp = tests\Images\Input\Bmp\pal4.bmp tests\Images\Input\Bmp\pal4.bmp = tests\Images\Input\Bmp\pal4.bmp
tests\Images\Input\Bmp\pal4rle.bmp = tests\Images\Input\Bmp\pal4rle.bmp tests\Images\Input\Bmp\pal4rle.bmp = tests\Images\Input\Bmp\pal4rle.bmp
tests\Images\Input\Bmp\pal4rlecut.bmp = tests\Images\Input\Bmp\pal4rlecut.bmp
tests\Images\Input\Bmp\pal4rletrns.bmp = tests\Images\Input\Bmp\pal4rletrns.bmp
tests\Images\Input\Bmp\pal8-0.bmp = tests\Images\Input\Bmp\pal8-0.bmp tests\Images\Input\Bmp\pal8-0.bmp = tests\Images\Input\Bmp\pal8-0.bmp
tests\Images\Input\Bmp\pal8gs.bmp = tests\Images\Input\Bmp\pal8gs.bmp tests\Images\Input\Bmp\pal8gs.bmp = tests\Images\Input\Bmp\pal8gs.bmp
tests\Images\Input\Bmp\pal8offs.bmp = tests\Images\Input\Bmp\pal8offs.bmp tests\Images\Input\Bmp\pal8offs.bmp = tests\Images\Input\Bmp\pal8offs.bmp
@ -71,26 +78,45 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bmp", "Bmp", "{1A82C5F6-90E
tests\Images\Input\Bmp\pal8os2v1_winv2.bmp = tests\Images\Input\Bmp\pal8os2v1_winv2.bmp tests\Images\Input\Bmp\pal8os2v1_winv2.bmp = tests\Images\Input\Bmp\pal8os2v1_winv2.bmp
tests\Images\Input\Bmp\pal8os2v2-16.bmp = tests\Images\Input\Bmp\pal8os2v2-16.bmp tests\Images\Input\Bmp\pal8os2v2-16.bmp = tests\Images\Input\Bmp\pal8os2v2-16.bmp
tests\Images\Input\Bmp\pal8os2v2.bmp = tests\Images\Input\Bmp\pal8os2v2.bmp tests\Images\Input\Bmp\pal8os2v2.bmp = tests\Images\Input\Bmp\pal8os2v2.bmp
tests\Images\Input\Bmp\pal8oversizepal.bmp = tests\Images\Input\Bmp\pal8oversizepal.bmp
tests\Images\Input\Bmp\pal8rlecut.bmp = tests\Images\Input\Bmp\pal8rlecut.bmp
tests\Images\Input\Bmp\pal8rletrns.bmp = tests\Images\Input\Bmp\pal8rletrns.bmp
tests\Images\Input\Bmp\pal8v4.bmp = tests\Images\Input\Bmp\pal8v4.bmp tests\Images\Input\Bmp\pal8v4.bmp = tests\Images\Input\Bmp\pal8v4.bmp
tests\Images\Input\Bmp\pal8v5.bmp = tests\Images\Input\Bmp\pal8v5.bmp tests\Images\Input\Bmp\pal8v5.bmp = tests\Images\Input\Bmp\pal8v5.bmp
tests\Images\Input\Bmp\PINES.BMP = tests\Images\Input\Bmp\PINES.BMP
tests\Images\Input\Bmp\rgb16-565.bmp = tests\Images\Input\Bmp\rgb16-565.bmp tests\Images\Input\Bmp\rgb16-565.bmp = tests\Images\Input\Bmp\rgb16-565.bmp
tests\Images\Input\Bmp\rgb16-565pal.bmp = tests\Images\Input\Bmp\rgb16-565pal.bmp tests\Images\Input\Bmp\rgb16-565pal.bmp = tests\Images\Input\Bmp\rgb16-565pal.bmp
tests\Images\Input\Bmp\rgb16.bmp = tests\Images\Input\Bmp\rgb16.bmp tests\Images\Input\Bmp\rgb16.bmp = tests\Images\Input\Bmp\rgb16.bmp
tests\Images\Input\Bmp\rgb16bfdef.bmp = tests\Images\Input\Bmp\rgb16bfdef.bmp tests\Images\Input\Bmp\rgb16bfdef.bmp = tests\Images\Input\Bmp\rgb16bfdef.bmp
tests\Images\Input\Bmp\rgb24.bmp = tests\Images\Input\Bmp\rgb24.bmp tests\Images\Input\Bmp\rgb24.bmp = tests\Images\Input\Bmp\rgb24.bmp
tests\Images\Input\Bmp\rgb24jpeg.bmp = tests\Images\Input\Bmp\rgb24jpeg.bmp
tests\Images\Input\Bmp\rgb24largepal.bmp = tests\Images\Input\Bmp\rgb24largepal.bmp
tests\Images\Input\Bmp\rgb24png.bmp = tests\Images\Input\Bmp\rgb24png.bmp
tests\Images\Input\Bmp\rgb24rle24.bmp = tests\Images\Input\Bmp\rgb24rle24.bmp
tests\Images\Input\Bmp\rgb32.bmp = tests\Images\Input\Bmp\rgb32.bmp tests\Images\Input\Bmp\rgb32.bmp = tests\Images\Input\Bmp\rgb32.bmp
tests\Images\Input\Bmp\rgb32bf.bmp = tests\Images\Input\Bmp\rgb32bf.bmp tests\Images\Input\Bmp\rgb32bf.bmp = tests\Images\Input\Bmp\rgb32bf.bmp
tests\Images\Input\Bmp\rgb32bfdef.bmp = tests\Images\Input\Bmp\rgb32bfdef.bmp tests\Images\Input\Bmp\rgb32bfdef.bmp = tests\Images\Input\Bmp\rgb32bfdef.bmp
tests\Images\Input\Bmp\rgb32h52.bmp = tests\Images\Input\Bmp\rgb32h52.bmp
tests\Images\Input\Bmp\rgba32-1010102.bmp = tests\Images\Input\Bmp\rgba32-1010102.bmp tests\Images\Input\Bmp\rgba32-1010102.bmp = tests\Images\Input\Bmp\rgba32-1010102.bmp
tests\Images\Input\Bmp\rgba32.bmp = tests\Images\Input\Bmp\rgba32.bmp tests\Images\Input\Bmp\rgba32.bmp = tests\Images\Input\Bmp\rgba32.bmp
tests\Images\Input\Bmp\rgba32abf.bmp = tests\Images\Input\Bmp\rgba32abf.bmp tests\Images\Input\Bmp\rgba32abf.bmp = tests\Images\Input\Bmp\rgba32abf.bmp
tests\Images\Input\Bmp\rgba32h56.bmp = tests\Images\Input\Bmp\rgba32h56.bmp tests\Images\Input\Bmp\rgba32h56.bmp = tests\Images\Input\Bmp\rgba32h56.bmp
tests\Images\Input\Bmp\rgba32v4.bmp = tests\Images\Input\Bmp\rgba32v4.bmp
tests\Images\Input\Bmp\rle24rlecut.bmp = tests\Images\Input\Bmp\rle24rlecut.bmp
tests\Images\Input\Bmp\rle24rletrns.bmp = tests\Images\Input\Bmp\rle24rletrns.bmp
tests\Images\Input\Bmp\rle4-delta-320x240.bmp = tests\Images\Input\Bmp\rle4-delta-320x240.bmp
tests\Images\Input\Bmp\rle8-blank-160x120.bmp = tests\Images\Input\Bmp\rle8-blank-160x120.bmp
tests\Images\Input\Bmp\rle8-delta-320x240.bmp = tests\Images\Input\Bmp\rle8-delta-320x240.bmp
tests\Images\Input\Bmp\RunLengthEncoded-inverted.bmp = tests\Images\Input\Bmp\RunLengthEncoded-inverted.bmp tests\Images\Input\Bmp\RunLengthEncoded-inverted.bmp = tests\Images\Input\Bmp\RunLengthEncoded-inverted.bmp
tests\Images\Input\Bmp\RunLengthEncoded.bmp = tests\Images\Input\Bmp\RunLengthEncoded.bmp tests\Images\Input\Bmp\RunLengthEncoded.bmp = tests\Images\Input\Bmp\RunLengthEncoded.bmp
tests\Images\Input\Bmp\SKATER.BMP = tests\Images\Input\Bmp\SKATER.BMP
tests\Images\Input\Bmp\SPADE.BMP = tests\Images\Input\Bmp\SPADE.BMP
tests\Images\Input\Bmp\SUNFLOW.BMP = tests\Images\Input\Bmp\SUNFLOW.BMP
tests\Images\Input\Bmp\test16-inverted.bmp = tests\Images\Input\Bmp\test16-inverted.bmp tests\Images\Input\Bmp\test16-inverted.bmp = tests\Images\Input\Bmp\test16-inverted.bmp
tests\Images\Input\Bmp\test16.bmp = tests\Images\Input\Bmp\test16.bmp tests\Images\Input\Bmp\test16.bmp = tests\Images\Input\Bmp\test16.bmp
tests\Images\Input\Bmp\test8-inverted.bmp = tests\Images\Input\Bmp\test8-inverted.bmp tests\Images\Input\Bmp\test8-inverted.bmp = tests\Images\Input\Bmp\test8-inverted.bmp
tests\Images\Input\Bmp\test8.bmp = tests\Images\Input\Bmp\test8.bmp tests\Images\Input\Bmp\test8.bmp = tests\Images\Input\Bmp\test8.bmp
tests\Images\Input\Bmp\WARPD.BMP = tests\Images\Input\Bmp\WARPD.BMP
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gif", "Gif", "{EE3FB0B3-1C31-41E9-93AB-BA800560A868}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gif", "Gif", "{EE3FB0B3-1C31-41E9-93AB-BA800560A868}"
@ -99,8 +125,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gif", "Gif", "{EE3FB0B3-1C3
tests\Images\Input\Gif\base_4x1.gif = tests\Images\Input\Gif\base_4x1.gif tests\Images\Input\Gif\base_4x1.gif = tests\Images\Input\Gif\base_4x1.gif
tests\Images\Input\Gif\cheers.gif = tests\Images\Input\Gif\cheers.gif tests\Images\Input\Gif\cheers.gif = tests\Images\Input\Gif\cheers.gif
tests\Images\Input\Gif\giphy.gif = tests\Images\Input\Gif\giphy.gif tests\Images\Input\Gif\giphy.gif = tests\Images\Input\Gif\giphy.gif
tests\Images\Input\Gif\GlobalQuantizationTest.gif = tests\Images\Input\Gif\GlobalQuantizationTest.gif
tests\Images\Input\Gif\image-zero-height.gif = tests\Images\Input\Gif\image-zero-height.gif
tests\Images\Input\Gif\image-zero-size.gif = tests\Images\Input\Gif\image-zero-size.gif
tests\Images\Input\Gif\image-zero-width.gif = tests\Images\Input\Gif\image-zero-width.gif
tests\Images\Input\Gif\kumin.gif = tests\Images\Input\Gif\kumin.gif tests\Images\Input\Gif\kumin.gif = tests\Images\Input\Gif\kumin.gif
tests\Images\Input\Gif\large_comment.gif = tests\Images\Input\Gif\large_comment.gif
tests\Images\Input\Gif\leo.gif = tests\Images\Input\Gif\leo.gif tests\Images\Input\Gif\leo.gif = tests\Images\Input\Gif\leo.gif
tests\Images\Input\Gif\max-height.gif = tests\Images\Input\Gif\max-height.gif
tests\Images\Input\Gif\max-width.gif = tests\Images\Input\Gif\max-width.gif
tests\Images\Input\Gif\receipt.gif = tests\Images\Input\Gif\receipt.gif
tests\Images\Input\Gif\rings.gif = tests\Images\Input\Gif\rings.gif tests\Images\Input\Gif\rings.gif = tests\Images\Input\Gif\rings.gif
tests\Images\Input\Gif\trans.gif = tests\Images\Input\Gif\trans.gif tests\Images\Input\Gif\trans.gif = tests\Images\Input\Gif\trans.gif
EndProjectSection EndProjectSection
@ -116,6 +150,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jpg", "Jpg", "{DB21FED7-E8C
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "baseline", "baseline", "{195BA3D3-3E9F-4BC5-AB40-5F9FEB638146}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "baseline", "baseline", "{195BA3D3-3E9F-4BC5-AB40-5F9FEB638146}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
tests\Images\Input\Jpg\baseline\640px-Unequalized_Hawkes_Bay_NZ.jpg = tests\Images\Input\Jpg\baseline\640px-Unequalized_Hawkes_Bay_NZ.jpg
tests\Images\Input\Jpg\baseline\AsianCarvingLowContrast.jpg = tests\Images\Input\Jpg\baseline\AsianCarvingLowContrast.jpg tests\Images\Input\Jpg\baseline\AsianCarvingLowContrast.jpg = tests\Images\Input\Jpg\baseline\AsianCarvingLowContrast.jpg
tests\Images\Input\Jpg\baseline\badeof.jpg = tests\Images\Input\Jpg\baseline\badeof.jpg tests\Images\Input\Jpg\baseline\badeof.jpg = tests\Images\Input\Jpg\baseline\badeof.jpg
tests\Images\Input\Jpg\baseline\badrst.jpg = tests\Images\Input\Jpg\baseline\badrst.jpg tests\Images\Input\Jpg\baseline\badrst.jpg = tests\Images\Input\Jpg\baseline\badrst.jpg
@ -125,6 +160,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "baseline", "baseline", "{19
tests\Images\Input\Jpg\baseline\Floorplan.jpg = tests\Images\Input\Jpg\baseline\Floorplan.jpg tests\Images\Input\Jpg\baseline\Floorplan.jpg = tests\Images\Input\Jpg\baseline\Floorplan.jpg
tests\Images\Input\Jpg\baseline\gamma_dalai_lama_gray.jpg = tests\Images\Input\Jpg\baseline\gamma_dalai_lama_gray.jpg tests\Images\Input\Jpg\baseline\gamma_dalai_lama_gray.jpg = tests\Images\Input\Jpg\baseline\gamma_dalai_lama_gray.jpg
tests\Images\Input\Jpg\baseline\Hiyamugi.jpg = tests\Images\Input\Jpg\baseline\Hiyamugi.jpg tests\Images\Input\Jpg\baseline\Hiyamugi.jpg = tests\Images\Input\Jpg\baseline\Hiyamugi.jpg
tests\Images\Input\Jpg\baseline\iptc-psAPP13-wIPTCempty.jpg = tests\Images\Input\Jpg\baseline\iptc-psAPP13-wIPTCempty.jpg
tests\Images\Input\Jpg\baseline\iptc.jpg = tests\Images\Input\Jpg\baseline\iptc.jpg
tests\Images\Input\Jpg\baseline\jpeg400jfif.jpg = tests\Images\Input\Jpg\baseline\jpeg400jfif.jpg tests\Images\Input\Jpg\baseline\jpeg400jfif.jpg = tests\Images\Input\Jpg\baseline\jpeg400jfif.jpg
tests\Images\Input\Jpg\baseline\jpeg420exif.jpg = tests\Images\Input\Jpg\baseline\jpeg420exif.jpg tests\Images\Input\Jpg\baseline\jpeg420exif.jpg = tests\Images\Input\Jpg\baseline\jpeg420exif.jpg
tests\Images\Input\Jpg\baseline\jpeg420small.jpg = tests\Images\Input\Jpg\baseline\jpeg420small.jpg tests\Images\Input\Jpg\baseline\jpeg420small.jpg = tests\Images\Input\Jpg\baseline\jpeg420small.jpg
@ -167,6 +204,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JpegSnoopReports", "JpegSno
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "issues", "issues", "{5C9B689F-B96D-47BE-A208-C23B1B2A8570}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "issues", "issues", "{5C9B689F-B96D-47BE-A208-C23B1B2A8570}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
tests\Images\Input\Jpg\issues\issue-1076-invalid-subsampling.jpg = tests\Images\Input\Jpg\issues\issue-1076-invalid-subsampling.jpg
tests\Images\Input\Jpg\issues\issue-1221-identify-multi-frame.jpg = tests\Images\Input\Jpg\issues\issue-1221-identify-multi-frame.jpg
tests\Images\Input\Jpg\issues\issue1006-incorrect-resize.jpg = tests\Images\Input\Jpg\issues\issue1006-incorrect-resize.jpg
tests\Images\Input\Jpg\issues\issue1049-exif-resize.jpg = tests\Images\Input\Jpg\issues\issue1049-exif-resize.jpg
tests\Images\Input\Jpg\issues\Issue159-MissingFF00-Progressive-Bedroom.jpg = tests\Images\Input\Jpg\issues\Issue159-MissingFF00-Progressive-Bedroom.jpg tests\Images\Input\Jpg\issues\Issue159-MissingFF00-Progressive-Bedroom.jpg = tests\Images\Input\Jpg\issues\Issue159-MissingFF00-Progressive-Bedroom.jpg
tests\Images\Input\Jpg\issues\Issue159-MissingFF00-Progressive-Girl.jpg = tests\Images\Input\Jpg\issues\Issue159-MissingFF00-Progressive-Girl.jpg tests\Images\Input\Jpg\issues\Issue159-MissingFF00-Progressive-Girl.jpg = tests\Images\Input\Jpg\issues\Issue159-MissingFF00-Progressive-Girl.jpg
tests\Images\Input\Jpg\issues\Issue178-BadCoeffsProgressive-Lemon.jpg = tests\Images\Input\Jpg\issues\Issue178-BadCoeffsProgressive-Lemon.jpg tests\Images\Input\Jpg\issues\Issue178-BadCoeffsProgressive-Lemon.jpg = tests\Images\Input\Jpg\issues\Issue178-BadCoeffsProgressive-Lemon.jpg
@ -214,6 +255,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fuzz", "fuzz", "{516A3532-6
tests\Images\Input\Jpg\issues\fuzz\Issue826-ArgumentException-C.jpg = tests\Images\Input\Jpg\issues\fuzz\Issue826-ArgumentException-C.jpg tests\Images\Input\Jpg\issues\fuzz\Issue826-ArgumentException-C.jpg = tests\Images\Input\Jpg\issues\fuzz\Issue826-ArgumentException-C.jpg
tests\Images\Input\Jpg\issues\fuzz\Issue827-AccessViolationException.jpg = tests\Images\Input\Jpg\issues\fuzz\Issue827-AccessViolationException.jpg tests\Images\Input\Jpg\issues\fuzz\Issue827-AccessViolationException.jpg = tests\Images\Input\Jpg\issues\fuzz\Issue827-AccessViolationException.jpg
tests\Images\Input\Jpg\issues\fuzz\Issue839-ExecutionEngineException.jpg = tests\Images\Input\Jpg\issues\fuzz\Issue839-ExecutionEngineException.jpg tests\Images\Input\Jpg\issues\fuzz\Issue839-ExecutionEngineException.jpg = tests\Images\Input\Jpg\issues\fuzz\Issue839-ExecutionEngineException.jpg
tests\Images\Input\Jpg\issues\fuzz\Issue922-AccessViolationException.jpg = tests\Images\Input\Jpg\issues\fuzz\Issue922-AccessViolationException.jpg
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JpegSnoopReports", "JpegSnoopReports", "{714CDEA1-9AE6-4F76-B8B1-A7DB8C1DB82F}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JpegSnoopReports", "JpegSnoopReports", "{714CDEA1-9AE6-4F76-B8B1-A7DB8C1DB82F}"
@ -261,16 +303,24 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Png", "Png", "{E1C42A6F-913
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
tests\Images\Input\Png\banner7-adam.png = tests\Images\Input\Png\banner7-adam.png tests\Images\Input\Png\banner7-adam.png = tests\Images\Input\Png\banner7-adam.png
tests\Images\Input\Png\banner8-index.png = tests\Images\Input\Png\banner8-index.png tests\Images\Input\Png\banner8-index.png = tests\Images\Input\Png\banner8-index.png
tests\Images\Input\Png\basn3p01.png = tests\Images\Input\Png\basn3p01.png
tests\Images\Input\Png\basn3p02.png = tests\Images\Input\Png\basn3p02.png
tests\Images\Input\Png\basn3p04.png = tests\Images\Input\Png\basn3p04.png
tests\Images\Input\Png\basn3p08.png = tests\Images\Input\Png\basn3p08.png
tests\Images\Input\Png\big-corrupted-chunk.png = tests\Images\Input\Png\big-corrupted-chunk.png tests\Images\Input\Png\big-corrupted-chunk.png = tests\Images\Input\Png\big-corrupted-chunk.png
tests\Images\Input\Png\bike-small.png = tests\Images\Input\Png\bike-small.png
tests\Images\Input\Png\Bike.png = tests\Images\Input\Png\Bike.png tests\Images\Input\Png\Bike.png = tests\Images\Input\Png\Bike.png
tests\Images\Input\Png\BikeGrayscale.png = tests\Images\Input\Png\BikeGrayscale.png tests\Images\Input\Png\BikeGrayscale.png = tests\Images\Input\Png\BikeGrayscale.png
tests\Images\Input\Png\blur.png = tests\Images\Input\Png\blur.png tests\Images\Input\Png\blur.png = tests\Images\Input\Png\blur.png
tests\Images\Input\Png\bpp1.png = tests\Images\Input\Png\bpp1.png tests\Images\Input\Png\bpp1.png = tests\Images\Input\Png\bpp1.png
tests\Images\Input\Png\Bradley01.png = tests\Images\Input\Png\Bradley01.png
tests\Images\Input\Png\Bradley02.png = tests\Images\Input\Png\Bradley02.png
tests\Images\Input\Png\CalliphoraPartial.png = tests\Images\Input\Png\CalliphoraPartial.png tests\Images\Input\Png\CalliphoraPartial.png = tests\Images\Input\Png\CalliphoraPartial.png
tests\Images\Input\Png\CalliphoraPartialGrayscale.png = tests\Images\Input\Png\CalliphoraPartialGrayscale.png tests\Images\Input\Png\CalliphoraPartialGrayscale.png = tests\Images\Input\Png\CalliphoraPartialGrayscale.png
tests\Images\Input\Png\chunklength1.png = tests\Images\Input\Png\chunklength1.png tests\Images\Input\Png\chunklength1.png = tests\Images\Input\Png\chunklength1.png
tests\Images\Input\Png\chunklength2.png = tests\Images\Input\Png\chunklength2.png tests\Images\Input\Png\chunklength2.png = tests\Images\Input\Png\chunklength2.png
tests\Images\Input\Png\cross.png = tests\Images\Input\Png\cross.png tests\Images\Input\Png\cross.png = tests\Images\Input\Png\cross.png
tests\Images\Input\Png\david.png = tests\Images\Input\Png\david.png
tests\Images\Input\Png\ducky.png = tests\Images\Input\Png\ducky.png tests\Images\Input\Png\ducky.png = tests\Images\Input\Png\ducky.png
tests\Images\Input\Png\filter0.png = tests\Images\Input\Png\filter0.png tests\Images\Input\Png\filter0.png = tests\Images\Input\Png\filter0.png
tests\Images\Input\Png\filter1.png = tests\Images\Input\Png\filter1.png tests\Images\Input\Png\filter1.png = tests\Images\Input\Png\filter1.png
@ -293,6 +343,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Png", "Png", "{E1C42A6F-913
tests\Images\Input\Png\iftbbn0g04.png = tests\Images\Input\Png\iftbbn0g04.png tests\Images\Input\Png\iftbbn0g04.png = tests\Images\Input\Png\iftbbn0g04.png
tests\Images\Input\Png\indexed.png = tests\Images\Input\Png\indexed.png tests\Images\Input\Png\indexed.png = tests\Images\Input\Png\indexed.png
tests\Images\Input\Png\interlaced.png = tests\Images\Input\Png\interlaced.png tests\Images\Input\Png\interlaced.png = tests\Images\Input\Png\interlaced.png
tests\Images\Input\Png\InvalidTextData.png = tests\Images\Input\Png\InvalidTextData.png
tests\Images\Input\Png\kaboom.png = tests\Images\Input\Png\kaboom.png tests\Images\Input\Png\kaboom.png = tests\Images\Input\Png\kaboom.png
tests\Images\Input\Png\low-variance.png = tests\Images\Input\Png\low-variance.png tests\Images\Input\Png\low-variance.png = tests\Images\Input\Png\low-variance.png
tests\Images\Input\Png\palette-8bpp.png = tests\Images\Input\Png\palette-8bpp.png tests\Images\Input\Png\palette-8bpp.png = tests\Images\Input\Png\palette-8bpp.png
@ -300,6 +351,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Png", "Png", "{E1C42A6F-913
tests\Images\Input\Png\pd-source.png = tests\Images\Input\Png\pd-source.png tests\Images\Input\Png\pd-source.png = tests\Images\Input\Png\pd-source.png
tests\Images\Input\Png\pd.png = tests\Images\Input\Png\pd.png tests\Images\Input\Png\pd.png = tests\Images\Input\Png\pd.png
tests\Images\Input\Png\pl.png = tests\Images\Input\Png\pl.png tests\Images\Input\Png\pl.png = tests\Images\Input\Png\pl.png
tests\Images\Input\Png\PngWithMetaData.png = tests\Images\Input\Png\PngWithMetaData.png
tests\Images\Input\Png\pp.png = tests\Images\Input\Png\pp.png tests\Images\Input\Png\pp.png = tests\Images\Input\Png\pp.png
tests\Images\Input\Png\rainbow.png = tests\Images\Input\Png\rainbow.png tests\Images\Input\Png\rainbow.png = tests\Images\Input\Png\rainbow.png
tests\Images\Input\Png\ratio-1x4.png = tests\Images\Input\Png\ratio-1x4.png tests\Images\Input\Png\ratio-1x4.png = tests\Images\Input\Png\ratio-1x4.png
@ -317,7 +369,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Png", "Png", "{E1C42A6F-913
tests\Images\Input\Png\versioning-1_2.png = tests\Images\Input\Png\versioning-1_2.png tests\Images\Input\Png\versioning-1_2.png = tests\Images\Input\Png\versioning-1_2.png
tests\Images\Input\Png\vim16x16_1.png = tests\Images\Input\Png\vim16x16_1.png tests\Images\Input\Png\vim16x16_1.png = tests\Images\Input\Png\vim16x16_1.png
tests\Images\Input\Png\vim16x16_2.png = tests\Images\Input\Png\vim16x16_2.png tests\Images\Input\Png\vim16x16_2.png = tests\Images\Input\Png\vim16x16_2.png
tests\Images\Input\Png\xc1n0g08.png = tests\Images\Input\Png\xc1n0g08.png
tests\Images\Input\Png\xc9n2c08.png = tests\Images\Input\Png\xc9n2c08.png
tests\Images\Input\Png\xd0n2c08.png = tests\Images\Input\Png\xd0n2c08.png
tests\Images\Input\Png\xd3n2c08.png = tests\Images\Input\Png\xd3n2c08.png
tests\Images\Input\Png\xdtn0g01.png = tests\Images\Input\Png\xdtn0g01.png
tests\Images\Input\Png\zlib-overflow.png = tests\Images\Input\Png\zlib-overflow.png tests\Images\Input\Png\zlib-overflow.png = tests\Images\Input\Png\zlib-overflow.png
tests\Images\Input\Png\zlib-overflow2.png = tests\Images\Input\Png\zlib-overflow2.png
tests\Images\Input\Png\zlib-ztxt-bad-header.png = tests\Images\Input\Png\zlib-ztxt-bad-header.png
EndProjectSection EndProjectSection
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Tests", "tests\ImageSharp.Tests\ImageSharp.Tests.csproj", "{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Tests", "tests\ImageSharp.Tests\ImageSharp.Tests.csproj", "{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}"
@ -333,6 +392,87 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SharedInfrastructure", "sha
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Tests.ProfilingSandbox", "tests\ImageSharp.Tests.ProfilingSandbox\ImageSharp.Tests.ProfilingSandbox.csproj", "{FC527290-2F22-432C-B77B-6E815726B02C}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Tests.ProfilingSandbox", "tests\ImageSharp.Tests.ProfilingSandbox\ImageSharp.Tests.ProfilingSandbox.csproj", "{FC527290-2F22-432C-B77B-6E815726B02C}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "issues", "issues", "{670DD46C-82E9-499A-B2D2-00A802ED0141}"
ProjectSection(SolutionItems) = preProject
tests\Images\Input\Png\issues\Issue_1014_1.png = tests\Images\Input\Png\issues\Issue_1014_1.png
tests\Images\Input\Png\issues\Issue_1014_2.png = tests\Images\Input\Png\issues\Issue_1014_2.png
tests\Images\Input\Png\issues\Issue_1014_3.png = tests\Images\Input\Png\issues\Issue_1014_3.png
tests\Images\Input\Png\issues\Issue_1014_4.png = tests\Images\Input\Png\issues\Issue_1014_4.png
tests\Images\Input\Png\issues\Issue_1014_5.png = tests\Images\Input\Png\issues\Issue_1014_5.png
tests\Images\Input\Png\issues\Issue_1014_6.png = tests\Images\Input\Png\issues\Issue_1014_6.png
tests\Images\Input\Png\issues\Issue_1047.png = tests\Images\Input\Png\issues\Issue_1047.png
tests\Images\Input\Png\issues\Issue_1127.png = tests\Images\Input\Png\issues\Issue_1127.png
tests\Images\Input\Png\issues\Issue_1177_1.png = tests\Images\Input\Png\issues\Issue_1177_1.png
tests\Images\Input\Png\issues\Issue_1177_2.png = tests\Images\Input\Png\issues\Issue_1177_2.png
tests\Images\Input\Png\issues\Issue_410.png = tests\Images\Input\Png\issues\Issue_410.png
tests\Images\Input\Png\issues\Issue_935.png = tests\Images\Input\Png\issues\Issue_935.png
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tga", "Tga", "{5DFC394F-136F-4B76-9BCA-3BA786515EFC}"
ProjectSection(SolutionItems) = preProject
tests\Images\Input\Tga\16bit_noalphabits.tga = tests\Images\Input\Tga\16bit_noalphabits.tga
tests\Images\Input\Tga\16bit_rle_noalphabits.tga = tests\Images\Input\Tga\16bit_rle_noalphabits.tga
tests\Images\Input\Tga\32bit_no_alphabits.tga = tests\Images\Input\Tga\32bit_no_alphabits.tga
tests\Images\Input\Tga\32bit_rle_no_alphabits.tga = tests\Images\Input\Tga\32bit_rle_no_alphabits.tga
tests\Images\Input\Tga\ccm8.tga = tests\Images\Input\Tga\ccm8.tga
tests\Images\Input\Tga\grayscale_a_LL.tga = tests\Images\Input\Tga\grayscale_a_LL.tga
tests\Images\Input\Tga\grayscale_a_LR.tga = tests\Images\Input\Tga\grayscale_a_LR.tga
tests\Images\Input\Tga\grayscale_a_rle_LL.tga = tests\Images\Input\Tga\grayscale_a_rle_LL.tga
tests\Images\Input\Tga\grayscale_a_rle_LR.tga = tests\Images\Input\Tga\grayscale_a_rle_LR.tga
tests\Images\Input\Tga\grayscale_a_rle_UL.tga = tests\Images\Input\Tga\grayscale_a_rle_UL.tga
tests\Images\Input\Tga\grayscale_a_rle_UR.tga = tests\Images\Input\Tga\grayscale_a_rle_UR.tga
tests\Images\Input\Tga\grayscale_a_UL.tga = tests\Images\Input\Tga\grayscale_a_UL.tga
tests\Images\Input\Tga\grayscale_a_UR.tga = tests\Images\Input\Tga\grayscale_a_UR.tga
tests\Images\Input\Tga\grayscale_LL.tga = tests\Images\Input\Tga\grayscale_LL.tga
tests\Images\Input\Tga\grayscale_LR.tga = tests\Images\Input\Tga\grayscale_LR.tga
tests\Images\Input\Tga\grayscale_rle_LR.tga = tests\Images\Input\Tga\grayscale_rle_LR.tga
tests\Images\Input\Tga\grayscale_rle_UL.tga = tests\Images\Input\Tga\grayscale_rle_UL.tga
tests\Images\Input\Tga\grayscale_rle_UR.tga = tests\Images\Input\Tga\grayscale_rle_UR.tga
tests\Images\Input\Tga\grayscale_UL.tga = tests\Images\Input\Tga\grayscale_UL.tga
tests\Images\Input\Tga\grayscale_UR.tga = tests\Images\Input\Tga\grayscale_UR.tga
tests\Images\Input\Tga\indexed_a_LL.tga = tests\Images\Input\Tga\indexed_a_LL.tga
tests\Images\Input\Tga\indexed_a_LR.tga = tests\Images\Input\Tga\indexed_a_LR.tga
tests\Images\Input\Tga\indexed_a_rle_LL.tga = tests\Images\Input\Tga\indexed_a_rle_LL.tga
tests\Images\Input\Tga\indexed_a_rle_LR.tga = tests\Images\Input\Tga\indexed_a_rle_LR.tga
tests\Images\Input\Tga\indexed_a_rle_UL.tga = tests\Images\Input\Tga\indexed_a_rle_UL.tga
tests\Images\Input\Tga\indexed_a_rle_UR.tga = tests\Images\Input\Tga\indexed_a_rle_UR.tga
tests\Images\Input\Tga\indexed_a_UL.tga = tests\Images\Input\Tga\indexed_a_UL.tga
tests\Images\Input\Tga\indexed_a_UR.tga = tests\Images\Input\Tga\indexed_a_UR.tga
tests\Images\Input\Tga\indexed_LR.tga = tests\Images\Input\Tga\indexed_LR.tga
tests\Images\Input\Tga\indexed_rle_LL.tga = tests\Images\Input\Tga\indexed_rle_LL.tga
tests\Images\Input\Tga\indexed_rle_LR.tga = tests\Images\Input\Tga\indexed_rle_LR.tga
tests\Images\Input\Tga\indexed_rle_UL.tga = tests\Images\Input\Tga\indexed_rle_UL.tga
tests\Images\Input\Tga\indexed_rle_UR.tga = tests\Images\Input\Tga\indexed_rle_UR.tga
tests\Images\Input\Tga\indexed_UL.tga = tests\Images\Input\Tga\indexed_UL.tga
tests\Images\Input\Tga\indexed_UR.tga = tests\Images\Input\Tga\indexed_UR.tga
tests\Images\Input\Tga\rgb15.tga = tests\Images\Input\Tga\rgb15.tga
tests\Images\Input\Tga\rgb15rle.tga = tests\Images\Input\Tga\rgb15rle.tga
tests\Images\Input\Tga\rgb24_top_left.tga = tests\Images\Input\Tga\rgb24_top_left.tga
tests\Images\Input\Tga\rgb_a_LL.tga = tests\Images\Input\Tga\rgb_a_LL.tga
tests\Images\Input\Tga\rgb_a_LR.tga = tests\Images\Input\Tga\rgb_a_LR.tga
tests\Images\Input\Tga\rgb_a_rle_LR.tga = tests\Images\Input\Tga\rgb_a_rle_LR.tga
tests\Images\Input\Tga\rgb_a_rle_UL.tga = tests\Images\Input\Tga\rgb_a_rle_UL.tga
tests\Images\Input\Tga\rgb_a_rle_UR.tga = tests\Images\Input\Tga\rgb_a_rle_UR.tga
tests\Images\Input\Tga\rgb_a_UL.tga = tests\Images\Input\Tga\rgb_a_UL.tga
tests\Images\Input\Tga\rgb_a_UR.tga = tests\Images\Input\Tga\rgb_a_UR.tga
tests\Images\Input\Tga\rgb_LR.tga = tests\Images\Input\Tga\rgb_LR.tga
tests\Images\Input\Tga\rgb_rle_LR.tga = tests\Images\Input\Tga\rgb_rle_LR.tga
tests\Images\Input\Tga\rgb_rle_UR.tga = tests\Images\Input\Tga\rgb_rle_UR.tga
tests\Images\Input\Tga\rgb_UR.tga = tests\Images\Input\Tga\rgb_UR.tga
tests\Images\Input\Tga\targa_16bit.tga = tests\Images\Input\Tga\targa_16bit.tga
tests\Images\Input\Tga\targa_16bit_pal.tga = tests\Images\Input\Tga\targa_16bit_pal.tga
tests\Images\Input\Tga\targa_16bit_rle.tga = tests\Images\Input\Tga\targa_16bit_rle.tga
tests\Images\Input\Tga\targa_24bit.tga = tests\Images\Input\Tga\targa_24bit.tga
tests\Images\Input\Tga\targa_24bit_pal.tga = tests\Images\Input\Tga\targa_24bit_pal.tga
tests\Images\Input\Tga\targa_24bit_pal_origin_topleft.tga = tests\Images\Input\Tga\targa_24bit_pal_origin_topleft.tga
tests\Images\Input\Tga\targa_24bit_rle.tga = tests\Images\Input\Tga\targa_24bit_rle.tga
tests\Images\Input\Tga\targa_24bit_rle_origin_topleft.tga = tests\Images\Input\Tga\targa_24bit_rle_origin_topleft.tga
tests\Images\Input\Tga\targa_32bit.tga = tests\Images\Input\Tga\targa_32bit.tga
tests\Images\Input\Tga\targa_32bit_rle.tga = tests\Images\Input\Tga\targa_32bit_rle.tga
tests\Images\Input\Tga\targa_8bit.tga = tests\Images\Input\Tga\targa_8bit.tga
tests\Images\Input\Tga\targa_8bit_rle.tga = tests\Images\Input\Tga\targa_8bit_rle.tga
EndProjectSection
EndProject
Global Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution GlobalSection(SharedMSBuildProjectFiles) = preSolution
shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems*{2aa31a1f-142c-43f4-8687-09abca4b3a26}*SharedItemsImports = 5 shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems*{2aa31a1f-142c-43f4-8687-09abca4b3a26}*SharedItemsImports = 5
@ -400,6 +540,7 @@ Global
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{1799C43E-5C54-4A8F-8D64-B1475241DB0D} = {C317F1B1-D75E-4C6D-83EB-80367343E0D7}
{FBE8C1AD-5AEC-4514-9B64-091D8E145865} = {1799C43E-5C54-4A8F-8D64-B1475241DB0D} {FBE8C1AD-5AEC-4514-9B64-091D8E145865} = {1799C43E-5C54-4A8F-8D64-B1475241DB0D}
{2AA31A1F-142C-43F4-8687-09ABCA4B3A26} = {815C0625-CD3D-440F-9F80-2D83856AB7AE} {2AA31A1F-142C-43F4-8687-09ABCA4B3A26} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
{FA55F5DE-11A6-487D-ABA4-BC93A02717DD} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC} {FA55F5DE-11A6-487D-ABA4-BC93A02717DD} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
@ -421,6 +562,8 @@ Global
{C0D7754B-5277-438E-ABEB-2BA34401B5A7} = {1799C43E-5C54-4A8F-8D64-B1475241DB0D} {C0D7754B-5277-438E-ABEB-2BA34401B5A7} = {1799C43E-5C54-4A8F-8D64-B1475241DB0D}
{68A8CC40-6AED-4E96-B524-31B1158FDEEA} = {815C0625-CD3D-440F-9F80-2D83856AB7AE} {68A8CC40-6AED-4E96-B524-31B1158FDEEA} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
{FC527290-2F22-432C-B77B-6E815726B02C} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC} {FC527290-2F22-432C-B77B-6E815726B02C} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{670DD46C-82E9-499A-B2D2-00A802ED0141} = {E1C42A6F-913B-4A7B-B1A8-2BB62843B254}
{5DFC394F-136F-4B76-9BCA-3BA786515EFC} = {9DA226A1-8656-49A8-A58A-A8B5C081AD66}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5F8B9D1F-CD8B-4CC5-8216-D531E25BD795} SolutionGuid = {5F8B9D1F-CD8B-4CC5-8216-D531E25BD795}

2
shared-infrastructure

@ -1 +1 @@
Subproject commit b0d4cd98647996265a668e852574d901b27f22d6 Subproject commit 2306bb8209f7c1f2eb9e2ba089b6f2fb87442380

30
src/Directory.Build.props

@ -5,40 +5,22 @@
Directory.Build.props is automatically picked up and imported by Directory.Build.props is automatically picked up and imported by
Microsoft.Common.props. This file needs to exist, even if empty so that Microsoft.Common.props. This file needs to exist, even if empty so that
files in the parent directory tree, with the same name, are not imported files in the parent directory tree, with the same name, are not imported
instead. The import fairly early and only Sdk.props will have been instead. They import fairly early and only Sdk.props will have been
imported beforehand. We also don't need to add ourselves to imported beforehand. We also don't need to add ourselves to
MSBuildAllProjects, as that is done by the file that imports us. MSBuildAllProjects, as that is done by the file that imports us.
--> -->
<PropertyGroup> <!-- Import the shared src .props file -->
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.props</MSBuildAllProjects> <Import Project="$(MSBuildThisFileDirectory)..\shared-infrastructure\msbuild\props\SixLabors.Src.props" />
<SixLaborsProjectCategory>src</SixLaborsProjectCategory>
</PropertyGroup>
<!-- Import the solution .props file. -->
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" /> <Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
<PropertyGroup> <!-- Compilation properties. -->
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\shared-infrastructure\SixLabors.ruleset</CodeAnalysisRuleSet>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'"> <PropertyGroup Condition="'$(Configuration)' == 'Release'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<!--Add deterministic builds in CI-->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<!-- DynamicProxyGenAssembly2 is needed so Moq can use our internals --> <!-- DynamicProxyGenAssembly2 is needed so Moq can use our internals -->
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" /> <InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
@ -47,6 +29,4 @@
<InternalsVisibleTo Include="SixLabors.ImageSharp.Tests" Key="$(SixLaborsPublicKey)" /> <InternalsVisibleTo Include="SixLabors.ImageSharp.Tests" Key="$(SixLaborsPublicKey)" />
</ItemGroup> </ItemGroup>
</Project> </Project>

84
src/Directory.Build.targets

@ -5,91 +5,15 @@
Directory.Build.targets is automatically picked up and imported by Directory.Build.targets is automatically picked up and imported by
Microsoft.Common.targets. This file needs to exist, even if empty so that Microsoft.Common.targets. This file needs to exist, even if empty so that
files in the parent directory tree, with the same name, are not imported files in the parent directory tree, with the same name, are not imported
instead. The import fairly late and most other props/targets will have instead. They import fairly late and most other props/targets will have
been imported beforehand. We also don't need to add ourselves to been imported beforehand. We also don't need to add ourselves to
MSBuildAllProjects, as that is done by the file that imports us. MSBuildAllProjects, as that is done by the file that imports us.
--> -->
<PropertyGroup> <!-- Import the shared src .targets file -->
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.targets</MSBuildAllProjects> <Import Project="$(MSBuildThisFileDirectory)..\shared-infrastructure\msbuild\targets\SixLabors.Src.targets" />
</PropertyGroup>
<!-- Import the solution .targets file. -->
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.targets" /> <Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.targets" />
<PropertyGroup>
<GeneratedInternalsVisibleToFile Condition="'$(GeneratedInternalsVisibleToFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension)</GeneratedInternalsVisibleToFile>
</PropertyGroup>
<!-- Workaround for running Coverlet with Determenistic builds -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>
<ItemGroup>
<SourceRoot Include="$(NuGetPackageRoot)" />
</ItemGroup>
<Target Name="CoverletGetPathMap"
DependsOnTargets="InitializeSourceRootMappedPaths"
Returns="@(_LocalTopLevelSourceRoot)"
Condition="'$(DeterministicSourcePaths)' == 'true'">
<ItemGroup>
<_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
</ItemGroup>
</Target>
<ItemDefinitionGroup>
<InternalsVisibleTo>
<Visible>false</Visible>
</InternalsVisibleTo>
</ItemDefinitionGroup>
<Target Name="GenerateInternalsVisibleTo"
BeforeTargets="CoreCompile"
DependsOnTargets="PrepareForBuild;CoreGenerateInternalsVisibleTo"
Condition="'@(InternalsVisibleTo)' != ''" />
<Target Name="CoreGenerateInternalsVisibleTo"
Condition="'$(Language)' == 'VB' or '$(Language)' == 'C#'"
Inputs="$(MSBuildAllProjects)"
Outputs="$(GeneratedInternalsVisibleToFile)">
<CreateItem Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute" AdditionalMetadata="_Parameter1=%(InternalsVisibleTo.Identity)" Condition="'%(InternalsVisibleTo.Key)' == ''">
<Output TaskParameter="Include" ItemName="InternalsVisibleToAttribute" />
</CreateItem>
<CreateItem Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute" AdditionalMetadata="_Parameter1=%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key)" Condition="'%(InternalsVisibleTo.Key)' != ''">
<Output TaskParameter="Include" ItemName="InternalsVisibleToAttribute" />
</CreateItem>
<WriteCodeFragment AssemblyAttributes="@(InternalsVisibleToAttribute)" Language="$(Language)" OutputFile="$(GeneratedInternalsVisibleToFile)">
<Output TaskParameter="OutputFile" ItemName="Compile" />
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
</WriteCodeFragment>
</Target>
<!-- Empty target so that `dotnet test` will work on the solution -->
<!-- https://github.com/Microsoft/vstest/issues/411 -->
<Target Name="VSTest" Condition="'$(IsTestProject)' == 'true'"/>
<ItemGroup>
<!--Shared config files that have to exist at root level.-->
<ConfigFilesToCopy Include="..\..\shared-infrastructure\.editorconfig;..\..\shared-infrastructure\.gitattributes" />
</ItemGroup>
<!--Ensures our config files are up to date.-->
<Target Name="CopyFiles" BeforeTargets="Build">
<Copy SourceFiles="@(ConfigFilesToCopy)"
SkipUnchangedFiles = "true"
DestinationFolder="..\..\" />
</Target>
<!-- Allows regenerating T4-generated files at build time using MsBuild -->
<!-- Enable on Windows OS to build all T4 templates. TODO: XPlat
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TextTemplating\Microsoft.TextTemplating.targets" />
<PropertyGroup>
<TransformOnBuild>true</TransformOnBuild>
</PropertyGroup>
-->
</Project> </Project>

39
src/ImageSharp/ImageSharp.csproj

@ -4,41 +4,36 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>SixLabors.ImageSharp</AssemblyName> <AssemblyName>SixLabors.ImageSharp</AssemblyName>
<AssemblyTitle>SixLabors.ImageSharp</AssemblyTitle> <AssemblyTitle>SixLabors.ImageSharp</AssemblyTitle>
<Description>A cross-platform library for the processing of image files; written in C#</Description>
<NeutralLanguage>en</NeutralLanguage>
<VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix>
<VersionPrefix Condition="$(packageversion) == ''">0.0.1</VersionPrefix>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>SixLabors.ImageSharp</PackageId>
<PackageTags>Image Resize Crop Gif Jpg Jpeg Bitmap Png Core</PackageTags>
<RootNamespace>SixLabors.ImageSharp</RootNamespace> <RootNamespace>SixLabors.ImageSharp</RootNamespace>
<PackageId>SixLabors.ImageSharp</PackageId>
<PackageIcon>sixlabors.imagesharp.128.png</PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<RepositoryUrl Condition="'$(RepositoryUrl)' == ''">https://github.com/SixLabors/ImageSharp/</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
<PackageTags>Image Resize Crop Gif Jpg Jpeg Bitmap Png Tga NetCore</PackageTags>
<Description>A new, fully featured, fully managed, cross-platform, 2D graphics API</Description>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" /> <None Include="..\..\shared-infrastructure\branding\icons\imagesharp\sixlabors.imagesharp.128.png" Pack="true" PackagePath="" />
<PackageReference Include="MinVer" PrivateAssets="All" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' "> <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" /> <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) OR '$(TargetFramework)' == 'net472'"> <ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) OR '$(TargetFramework)' == 'net472'">
<PackageReference Include="System.Numerics.Vectors" /> <PackageReference Include="System.Numerics.Vectors" Version="4.5.0"/>
<PackageReference Include="System.Buffers" /> <PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.Memory" /> <PackageReference Include="System.Memory" Version="4.5.4"/>
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3'"> <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="System.IO.Compression" /> <PackageReference Include="System.IO.Compression" Version="4.3.0"/>
<PackageReference Include="System.IO.UnmanagedMemoryStream" /> <PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.3.0" />
<PackageReference Include="System.Threading.Tasks.Parallel" /> <PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0"/>
<PackageReference Include="System.ValueTuple" /> <PackageReference Include="System.ValueTuple" Version="4.5.0"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

BIN
src/ImageSharp/Metadata/Profiles/Exif/DC-008-Translation-2019-E.pdf

Binary file not shown.

BIN
src/ImageSharp/Metadata/Profiles/Exif/DC-X008-Translation-2019-E.pdf

Binary file not shown.

28
tests/Directory.Build.props

@ -5,34 +5,20 @@
Directory.Build.props is automatically picked up and imported by Directory.Build.props is automatically picked up and imported by
Microsoft.Common.props. This file needs to exist, even if empty so that Microsoft.Common.props. This file needs to exist, even if empty so that
files in the parent directory tree, with the same name, are not imported files in the parent directory tree, with the same name, are not imported
instead. The import fairly early and only Sdk.props will have been instead. They import fairly early and only Sdk.props will have been
imported beforehand. We also don't need to add ourselves to imported beforehand. We also don't need to add ourselves to
MSBuildAllProjects, as that is done by the file that imports us. MSBuildAllProjects, as that is done by the file that imports us.
--> -->
<PropertyGroup> <!-- Import the shared tests .props file -->
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.props</MSBuildAllProjects> <Import Project="$(MSBuildThisFileDirectory)..\shared-infrastructure\msbuild\props\SixLabors.Tests.props" />
<SixLaborsProjectCategory>tests</SixLaborsProjectCategory>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\shared-infrastructure\SixLabors.Tests.ruleset</CodeAnalysisRuleSet>
<!--TODO: We should remove all obsolete code from the solution-->
<NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>
<!-- Import the solution .props file. -->
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" /> <Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
<ItemGroup Condition="'$(IsTestProject)' == 'true'"> <PropertyGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" IsImplicitlyDefined="true" /> <CodeAnalysisRuleSet>..\ImageSharp.Tests.ruleset</CodeAnalysisRuleSet>
<PackageReference Include="xunit" IsImplicitlyDefined="true" /> </PropertyGroup>
<PackageReference Include="xunit.runner.visualstudio" IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup Condition="'$(codecov)' == 'true' AND '$(IsTestProject)' == 'true'">
<PackageReference Include="coverlet.collector" IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)..\src\ImageSharp\ImageSharp.csproj" /> <ProjectReference Include="$(MSBuildThisFileDirectory)..\src\ImageSharp\ImageSharp.csproj" />

26
tests/Directory.Build.targets

@ -5,42 +5,30 @@
Directory.Build.targets is automatically picked up and imported by Directory.Build.targets is automatically picked up and imported by
Microsoft.Common.targets. This file needs to exist, even if empty so that Microsoft.Common.targets. This file needs to exist, even if empty so that
files in the parent directory tree, with the same name, are not imported files in the parent directory tree, with the same name, are not imported
instead. The import fairly late and most other props/targets will have instead. They import fairly late and most other props/targets will have
been imported beforehand. We also don't need to add ourselves to been imported beforehand. We also don't need to add ourselves to
MSBuildAllProjects, as that is done by the file that imports us. MSBuildAllProjects, as that is done by the file that imports us.
--> -->
<PropertyGroup> <!-- Import the shared tests .targets file -->
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.targets</MSBuildAllProjects> <Import Project="$(MSBuildThisFileDirectory)..\shared-infrastructure\msbuild\targets\SixLabors.Tests.targets" />
</PropertyGroup>
<!-- Import the solution .targets file. -->
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.targets" /> <Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.targets" />
<!-- Tool versions for tool references across all projects -->
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<!--dotnet tools does not have an x86 runner. You have to use separate SDKs-->
<!--https://github.com/actions/setup-dotnet/issues/72-->
<DotNetCliToolReference Update="dotnet-xunit" Version="2.3.1" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<!--Test Dependencies--> <!-- Test Dependencies -->
<PackageReference Update="BenchmarkDotNet" Version="0.12.1" /> <PackageReference Update="BenchmarkDotNet" Version="0.12.1" />
<PackageReference Update="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1" Condition="'$(OS)' == 'Windows_NT'" /> <PackageReference Update="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1" Condition="'$(IsWindows)'=='true'" />
<PackageReference Update="Colourful" Version="2.0.5" /> <PackageReference Update="Colourful" Version="2.0.5" />
<PackageReference Update="coverlet.collector" Version="1.3.1-preview.27.gdd2237a3be" PrivateAssets="All"/>
<PackageReference Update="Magick.NET-Q16-AnyCPU" Version="7.22.0" /> <PackageReference Update="Magick.NET-Q16-AnyCPU" Version="7.22.0" />
<PackageReference Update="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.20513.1" /> <PackageReference Update="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.20513.1" />
<PackageReference Update="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.20513.1" /> <PackageReference Update="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.20513.1" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Update="Moq" Version="4.14.6" /> <PackageReference Update="Moq" Version="4.14.6" />
<PackageReference Update="Pfim" Version="0.9.1" /> <PackageReference Update="Pfim" Version="0.9.1" />
<!-- Enable support for using libgdiplus on macOS --> <PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="5.8.64" Condition="'$(IsOSX)'=='true'" />
<PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="5.8.64" Condition="$([MSBuild]::IsOSPlatform('OSX'))" />
<PackageReference Update="SharpZipLib" Version="1.3.0" /> <PackageReference Update="SharpZipLib" Version="1.3.0" />
<PackageReference Update="System.Drawing.Common" Version="4.7.0" /> <PackageReference Update="System.Drawing.Common" Version="4.7.0" />
<PackageReference Update="xunit" Version="2.4.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup> </ItemGroup>
</Project> </Project>

12
tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpeg_ImageSpecific.cs

@ -25,18 +25,14 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg
{ {
public class Config : ManualConfig public class Config : ManualConfig
{ {
public Config() public Config() => this.AddDiagnoser(MemoryDiagnoser.Default);
{
this.Add(MemoryDiagnoser.Default);
}
public class ShortClr : Benchmarks.Config public class ShortClr : Benchmarks.Config
{ {
public ShortClr() public ShortClr() =>
{
// Job.Default.With(ClrRuntime.Net472).WithLaunchCount(1).WithWarmupCount(2).WithIterationCount(3), // Job.Default.With(ClrRuntime.Net472).WithLaunchCount(1).WithWarmupCount(2).WithIterationCount(3),
this.Add(Job.Default.With(CoreRuntime.Core31).WithLaunchCount(1).WithWarmupCount(2).WithIterationCount(3)); this.AddJob(Job.Default.WithRuntime(CoreRuntime.Core31).WithLaunchCount(1).WithWarmupCount(2).WithIterationCount(3));
}
} }
} }

61
tests/ImageSharp.Benchmarks/Codecs/MultiImageBenchmarkBase.cs

@ -1,49 +1,40 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Numerics;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs; using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Environments;
using BenchmarkDotNet.Jobs; using BenchmarkDotNet.Jobs;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Tests;
using CoreImage = SixLabors.ImageSharp.Image;
namespace SixLabors.ImageSharp.Benchmarks.Codecs namespace SixLabors.ImageSharp.Benchmarks.Codecs
{ {
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Numerics;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Environments;
using SixLabors.ImageSharp.Tests;
using CoreImage = SixLabors.ImageSharp.Image;
public abstract class MultiImageBenchmarkBase public abstract class MultiImageBenchmarkBase
{ {
public class Config : ManualConfig public class Config : ManualConfig
{ {
public Config() public Config() => this.AddDiagnoser(MemoryDiagnoser.Default);
{
// Uncomment if you want to use any of the diagnoser
this.Add(MemoryDiagnoser.Default);
}
public class ShortClr : Benchmarks.Config public class ShortClr : Benchmarks.Config
{ {
public ShortClr() public ShortClr() => this.AddJob(Job.Default.WithRuntime(CoreRuntime.Core21).WithLaunchCount(1).WithWarmupCount(1).WithIterationCount(2));
{
this.Add(Job.Default.With(CoreRuntime.Core21).WithLaunchCount(1).WithWarmupCount(1).WithIterationCount(2));
}
} }
} }
protected Dictionary<string, byte[]> fileNamesToBytes = new Dictionary<string, byte[]>(); protected Dictionary<string, byte[]> FileNamesToBytes { get; set; } = new Dictionary<string, byte[]>();
protected Dictionary<string, Image<Rgba32>> fileNamesToImageSharpImages = new Dictionary<string, Image<Rgba32>>();
protected Dictionary<string, Bitmap> fileNamesToSystemDrawingImages = new Dictionary<string, System.Drawing.Bitmap>(); protected Dictionary<string, Image<Rgba32>> FileNamesToImageSharpImages { get; set; } = new Dictionary<string, Image<Rgba32>>();
protected Dictionary<string, Bitmap> FileNamesToSystemDrawingImages { get; set; } = new Dictionary<string, System.Drawing.Bitmap>();
/// <summary> /// <summary>
/// The values of this enum separate input files into categories. /// The values of this enum separate input files into categories.
@ -109,7 +100,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs
protected IEnumerable<KeyValuePair<string, byte[]>> FileNames2Bytes protected IEnumerable<KeyValuePair<string, byte[]>> FileNames2Bytes
=> =>
this.EnumeratePairsByBenchmarkSettings( this.EnumeratePairsByBenchmarkSettings(
this.fileNamesToBytes, this.FileNamesToBytes,
arr => arr.Length < this.LargeImageThresholdInBytes); arr => arr.Length < this.LargeImageThresholdInBytes);
protected abstract IEnumerable<string> InputImageSubfoldersOrFiles { get; } protected abstract IEnumerable<string> InputImageSubfoldersOrFiles { get; }
@ -132,7 +123,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs
{ {
if (File.Exists(path)) if (File.Exists(path))
{ {
this.fileNamesToBytes[path] = File.ReadAllBytes(path); this.FileNamesToBytes[path] = File.ReadAllBytes(path);
continue; continue;
} }
@ -146,7 +137,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs
foreach (string fn in allFiles) foreach (string fn in allFiles)
{ {
this.fileNamesToBytes[fn] = File.ReadAllBytes(fn); this.FileNamesToBytes[fn] = File.ReadAllBytes(fn);
} }
} }
} }
@ -180,30 +171,30 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs
{ {
base.ReadFilesImpl(); base.ReadFilesImpl();
foreach (KeyValuePair<string, byte[]> kv in this.fileNamesToBytes) foreach (KeyValuePair<string, byte[]> kv in this.FileNamesToBytes)
{ {
byte[] bytes = kv.Value; byte[] bytes = kv.Value;
string fn = kv.Key; string fn = kv.Key;
using (var ms1 = new MemoryStream(bytes)) using (var ms1 = new MemoryStream(bytes))
{ {
this.fileNamesToImageSharpImages[fn] = CoreImage.Load<Rgba32>(ms1); this.FileNamesToImageSharpImages[fn] = CoreImage.Load<Rgba32>(ms1);
} }
this.fileNamesToSystemDrawingImages[fn] = new Bitmap(new MemoryStream(bytes)); this.FileNamesToSystemDrawingImages[fn] = new Bitmap(new MemoryStream(bytes));
} }
} }
protected IEnumerable<KeyValuePair<string, Image<Rgba32>>> FileNames2ImageSharpImages protected IEnumerable<KeyValuePair<string, Image<Rgba32>>> FileNames2ImageSharpImages
=> =>
this.EnumeratePairsByBenchmarkSettings( this.EnumeratePairsByBenchmarkSettings(
this.fileNamesToImageSharpImages, this.FileNamesToImageSharpImages,
img => img.Width * img.Height < this.LargeImageThresholdInPixels); img => img.Width * img.Height < this.LargeImageThresholdInPixels);
protected IEnumerable<KeyValuePair<string, System.Drawing.Bitmap>> FileNames2SystemDrawingImages protected IEnumerable<KeyValuePair<string, System.Drawing.Bitmap>> FileNames2SystemDrawingImages
=> =>
this.EnumeratePairsByBenchmarkSettings( this.EnumeratePairsByBenchmarkSettings(
this.fileNamesToSystemDrawingImages, this.FileNamesToSystemDrawingImages,
img => img.Width * img.Height < this.LargeImageThresholdInPixels); img => img.Width * img.Height < this.LargeImageThresholdInPixels);
protected virtual int LargeImageThresholdInPixels => 700000; protected virtual int LargeImageThresholdInPixels => 700000;

33
tests/ImageSharp.Benchmarks/Config.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
#if Windows_NT #if OS_WINDOWS
using System.Security.Principal; using System.Security.Principal;
using BenchmarkDotNet.Diagnostics.Windows; using BenchmarkDotNet.Diagnostics.Windows;
#endif #endif
@ -16,12 +16,12 @@ namespace SixLabors.ImageSharp.Benchmarks
{ {
public Config() public Config()
{ {
this.Add(MemoryDiagnoser.Default); this.AddDiagnoser(MemoryDiagnoser.Default);
#if Windows_NT #if OS_WINDOWS
if (this.IsElevated) if (this.IsElevated)
{ {
this.Add(new NativeMemoryProfiler()); this.AddDiagnoser(new NativeMemoryProfiler());
} }
#endif #endif
@ -29,31 +29,20 @@ namespace SixLabors.ImageSharp.Benchmarks
public class ShortClr : Config public class ShortClr : Config
{ {
public ShortClr() public ShortClr() => this.AddJob(
{ Job.Default.WithRuntime(ClrRuntime.Net472).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3),
this.Add( Job.Default.WithRuntime(CoreRuntime.Core31).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3),
Job.Default.With(ClrRuntime.Net472).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3), Job.Default.WithRuntime(CoreRuntime.Core21).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3));
Job.Default.With(CoreRuntime.Core31).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3),
Job.Default.With(CoreRuntime.Core21).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3));
}
} }
public class ShortCore31 : Config public class ShortCore31 : Config
{ {
public ShortCore31() public ShortCore31()
{ => this.AddJob(Job.Default.WithRuntime(CoreRuntime.Core31).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3));
this.Add(Job.Default.With(CoreRuntime.Core31).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3));
}
} }
#if Windows_NT #if OS_WINDOWS
private bool IsElevated private bool IsElevated => new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);
{
get
{
return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);
}
}
#endif #endif
} }
} }

1
tests/ImageSharp.Tests.ProfilingSandbox/ImageSharp.Tests.ProfilingSandbox.csproj

@ -12,6 +12,7 @@
<StartupObject>SixLabors.ImageSharp.Tests.ProfilingSandbox.Program</StartupObject> <StartupObject>SixLabors.ImageSharp.Tests.ProfilingSandbox.Program</StartupObject>
<!--Used to hide test project from dotnet test--> <!--Used to hide test project from dotnet test-->
<IsTestProject>false</IsTestProject> <IsTestProject>false</IsTestProject>
<EnsureNETCoreAppRuntime>false</EnsureNETCoreAppRuntime>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

10
tests/ImageSharp.Tests.ruleset

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="ImageSharp.Tests" ToolsVersion="16.0">
<Include Path="..\..\sharedinfrastructure\sixlabors.tests.ruleset" Action="Default" />
<Rules AnalyzerId="xunit.analyzers" RuleNamespace="xunit.analyzers">
<Rule Id="xUnit1004" Action="None" />
<Rule Id="xUnit1013" Action="None" />
<Rule Id="xUnit1026" Action="None" />
<Rule Id="xUnit2013" Action="None" />
</Rules>
</RuleSet>

115
tests/ImageSharp.Tests/FileTestBase.cs

@ -1,115 +0,0 @@
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Collections.Generic;
namespace SixLabors.ImageSharp.Tests
{
/// <summary>
/// The test base class for reading and writing to files.
/// </summary>
[Obsolete("See: https://github.com/SixLabors/ImageSharp/issues/868")]
public abstract class FileTestBase
{
/// <summary>
/// TODO: We really should not depend on this! Let's use well defined, test-case specific inputs everywhere!
/// A collection made up of one file for each image format
/// </summary>
public static IEnumerable<string> DefaultFiles =
new[]
{
TestImages.Bmp.Car,
TestImages.Jpeg.Baseline.Calliphora,
TestImages.Png.Splash,
TestImages.Gif.Trans
};
/// <summary>
/// A collection of all the bmp test images
/// </summary>
public static IEnumerable<string> AllBmpFiles = TestImages.Bmp.Benchmark;
/// <summary>
/// A collection of all the jpeg test images
/// </summary>
public static IEnumerable<string> AllJpegFiles = TestImages.Jpeg.All;
/// <summary>
/// A collection of all the png test images
/// </summary>
public static IEnumerable<string> AllPngFiles = TestImages.Png.All;
/// <summary>
/// A collection of all the gif test images
/// </summary>
public static IEnumerable<string> AllGifFiles = TestImages.Gif.All;
/// <summary>
/// The standard pixel format enumeration
/// </summary>
public const PixelTypes DefaultPixelType = PixelTypes.Rgba32;
/// <summary>
/// A few other pixel types to prove that a processor is not bound to a single one.
/// </summary>
public const PixelTypes CommonNonDefaultPixelTypes = PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.RgbaVector;
public static class Extensions
{
public const string Bmp = "bmp";
public const string Jpeg = "jpg";
public const string Png = "png";
public const string Gif = "gif";
}
/// <summary>
/// The collection of image files to test against.
/// </summary>
protected static readonly List<TestFile> Files = new List<TestFile>
{
#pragma warning disable SA1515 // Single-line comment should be preceded by blank line
TestFile.Create(TestImages.Jpeg.Baseline.Calliphora),
// TestFile.Create(TestImages.Jpeg.Baseline.Turtle), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Baseline.Ycck), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Baseline.Cmyk), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Baseline.Floorplan), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Progressive.Festzug), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Baseline.Bad.BadEOF), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Baseline.Bad.ExifUndefType), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Progressive.Fb), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Progressive.Progress), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Baseline.GammaDalaiLamaGray), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Jpeg.Progressive.Bad.BadEOF), // Perf: Enable for local testing only
TestFile.Create(TestImages.Bmp.Car),
// TestFile.Create(TestImages.Bmp.NegHeight), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Bmp.CoreHeader), // Perf: Enable for local testing only
TestFile.Create(TestImages.Png.Splash),
// TestFile.Create(TestImages.Png.SnakeGame),
// TestFile.Create(TestImages.Png.Cross), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Bad.ChunkLength1), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Bad.ChunkLength2), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Powerpoint), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Blur), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Indexed), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.SplashInterlaced), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Interlaced), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter0), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter1), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter2), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter3), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter4), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.FilterVar), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.P1), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Pd), // Perf: Enable for local testing only
TestFile.Create(TestImages.Gif.Rings),
// TestFile.Create(TestImages.Gif.Trans), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Gif.Cheers), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Gif.Giphy) // Perf: Enable for local testing only
};
#pragma warning restore SA1515 // Single-line comment should be preceded by blank line
}
}

37
tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs

@ -2,25 +2,47 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using SixLabors.ImageSharp.Formats; using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Formats.Png; using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing; using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Processors.Quantization; using SixLabors.ImageSharp.Processing.Processors.Quantization;
using Xunit; using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats namespace SixLabors.ImageSharp.Tests.Formats
{ {
public class GeneralFormatTests : FileTestBase public class GeneralFormatTests
{ {
/// <summary>
/// A collection made up of one file for each image format
/// </summary>
public static readonly IEnumerable<string> DefaultFiles =
new[]
{
TestImages.Bmp.Car,
TestImages.Jpeg.Baseline.Calliphora,
TestImages.Png.Splash,
TestImages.Gif.Trans
};
/// <summary>
/// The collection of image files to test against.
/// </summary>
protected static readonly List<TestFile> Files = new List<TestFile>
{
TestFile.Create(TestImages.Jpeg.Baseline.Calliphora),
TestFile.Create(TestImages.Bmp.Car),
TestFile.Create(TestImages.Png.Splash),
TestFile.Create(TestImages.Gif.Rings),
};
[Theory] [Theory]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] [WithFileCollection(nameof(DefaultFiles), PixelTypes.Rgba32)]
public void ResolutionShouldChange<TPixel>(TestImageProvider<TPixel> provider) public void ResolutionShouldChange<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel> where TPixel : unmanaged, IPixel<TPixel>
{ {
@ -200,7 +222,7 @@ namespace SixLabors.ImageSharp.Tests.Formats
[Fact] [Fact]
public void IdentifyReturnsNullWithInvalidStream() public void IdentifyReturnsNullWithInvalidStream()
{ {
byte[] invalid = new byte[10]; var invalid = new byte[10];
using (var memoryStream = new MemoryStream(invalid)) using (var memoryStream = new MemoryStream(invalid))
{ {
@ -212,8 +234,7 @@ namespace SixLabors.ImageSharp.Tests.Formats
} }
private static IImageFormat GetFormat(string format) private static IImageFormat GetFormat(string format)
{ => Configuration.Default.ImageFormats
return Configuration.Default.ImageFormats.FirstOrDefault(x => x.FileExtensions.Contains(format)); .FirstOrDefault(x => x.FileExtensions.Contains(format));
}
} }
} }

45
tests/ImageSharp.Tests/Formats/ImageFormatManagerTests.cs

@ -46,45 +46,22 @@ namespace SixLabors.ImageSharp.Tests.Formats
[Fact] [Fact]
public void AddImageFormatDetectorNullThrows() public void AddImageFormatDetectorNullThrows()
{ => Assert.Throws<ArgumentNullException>(() => this.DefaultFormatsManager.AddImageFormatDetector(null));
Assert.Throws<ArgumentNullException>(() =>
{
this.DefaultFormatsManager.AddImageFormatDetector(null);
});
}
[Fact] [Fact]
public void RegisterNullMimeTypeEncoder() public void RegisterNullMimeTypeEncoder()
{ {
Assert.Throws<ArgumentNullException>(() => Assert.Throws<ArgumentNullException>(() => this.DefaultFormatsManager.SetEncoder(null, new Mock<IImageEncoder>().Object));
{ Assert.Throws<ArgumentNullException>(() => this.DefaultFormatsManager.SetEncoder(BmpFormat.Instance, null));
this.DefaultFormatsManager.SetEncoder(null, new Mock<IImageEncoder>().Object); Assert.Throws<ArgumentNullException>(() => this.DefaultFormatsManager.SetEncoder(null, null));
});
Assert.Throws<ArgumentNullException>(() =>
{
this.DefaultFormatsManager.SetEncoder(BmpFormat.Instance, null);
});
Assert.Throws<ArgumentNullException>(() =>
{
this.DefaultFormatsManager.SetEncoder(null, null);
});
} }
[Fact] [Fact]
public void RegisterNullSetDecoder() public void RegisterNullSetDecoder()
{ {
Assert.Throws<ArgumentNullException>(() => Assert.Throws<ArgumentNullException>(() => this.DefaultFormatsManager.SetDecoder(null, new Mock<IImageDecoder>().Object));
{ Assert.Throws<ArgumentNullException>(() => this.DefaultFormatsManager.SetDecoder(BmpFormat.Instance, null));
this.DefaultFormatsManager.SetDecoder(null, new Mock<IImageDecoder>().Object); Assert.Throws<ArgumentNullException>(() => this.DefaultFormatsManager.SetDecoder(null, null));
});
Assert.Throws<ArgumentNullException>(() =>
{
this.DefaultFormatsManager.SetDecoder(BmpFormat.Instance, null);
});
Assert.Throws<ArgumentNullException>(() =>
{
this.DefaultFormatsManager.SetDecoder(null, null);
});
} }
[Fact] [Fact]
@ -133,11 +110,9 @@ namespace SixLabors.ImageSharp.Tests.Formats
byte[] jpegImage; byte[] jpegImage;
using (var buffer = new MemoryStream()) using (var buffer = new MemoryStream())
{ {
using (var image = new Image<Rgba32>(100, 100)) using var image = new Image<Rgba32>(100, 100);
{ image.SaveAsJpeg(buffer);
image.SaveAsJpeg(buffer); jpegImage = buffer.ToArray();
jpegImage = buffer.ToArray();
}
} }
byte[] invalidImage = { 1, 2, 3 }; byte[] invalidImage = { 1, 2, 3 };

12
tests/ImageSharp.Tests/GlobalSuppressions.cs

@ -1,12 +0,0 @@
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
#pragma warning disable SA1404 // Code analysis suppression should have justification
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "xUnit1026:Theory methods should use all of their parameters")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "xUnit1013:Public method should be marked as test")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Assertions", "xUnit2013:Do not use equality check to check for collection size.")]
#pragma warning restore SA1404 // Code analysis suppression should have justification

4
tests/ImageSharp.Tests/ImageSharp.Tests.csproj

@ -3,17 +3,13 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net472</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net472</TargetFrameworks>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<AssemblyName>SixLabors.ImageSharp.Tests</AssemblyName> <AssemblyName>SixLabors.ImageSharp.Tests</AssemblyName>
<Platforms>AnyCPU;x64;x86</Platforms> <Platforms>AnyCPU;x64;x86</Platforms>
<RootNamespace>SixLabors.ImageSharp.Tests</RootNamespace> <RootNamespace>SixLabors.ImageSharp.Tests</RootNamespace>
<!--Used to show test project to dotnet test-->
<IsTestProject>true</IsTestProject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="dotnet-xunit" />
<InternalsVisibleTo Include="ImageSharp.Tests.ProfilingSandbox" Key="$(SixLaborsPublicKey)" /> <InternalsVisibleTo Include="ImageSharp.Tests.ProfilingSandbox" Key="$(SixLaborsPublicKey)" />
</ItemGroup> </ItemGroup>

2
tests/ImageSharp.Tests/TestImages.cs

@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Tests
{ {
/// <summary> /// <summary>
/// Class that contains all the relative test image paths in the TestImages/Formats directory. /// Class that contains all the relative test image paths in the TestImages/Formats directory.
/// Use with <see cref="WithFileAttribute"/>, <see cref="WithFileCollectionAttribute"/> or <see cref="FileTestBase"/>. /// Use with <see cref="WithFileAttribute"/>, <see cref="WithFileCollectionAttribute"/>.
/// </summary> /// </summary>
public static class TestImages public static class TestImages
{ {

16
tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs

@ -20,9 +20,7 @@ namespace SixLabors.ImageSharp.Tests
public class TestEnvironmentTests public class TestEnvironmentTests
{ {
public TestEnvironmentTests(ITestOutputHelper output) public TestEnvironmentTests(ITestOutputHelper output)
{ => this.Output = output;
this.Output = output;
}
private ITestOutputHelper Output { get; } private ITestOutputHelper Output { get; }
@ -34,21 +32,15 @@ namespace SixLabors.ImageSharp.Tests
[Fact] [Fact]
public void SolutionDirectoryFullPath() public void SolutionDirectoryFullPath()
{ => this.CheckPath(TestEnvironment.SolutionDirectoryFullPath);
this.CheckPath(TestEnvironment.SolutionDirectoryFullPath);
}
[Fact] [Fact]
public void InputImagesDirectoryFullPath() public void InputImagesDirectoryFullPath()
{ => this.CheckPath(TestEnvironment.InputImagesDirectoryFullPath);
this.CheckPath(TestEnvironment.InputImagesDirectoryFullPath);
}
[Fact] [Fact]
public void ExpectedOutputDirectoryFullPath() public void ExpectedOutputDirectoryFullPath()
{ => this.CheckPath(TestEnvironment.ReferenceOutputDirectoryFullPath);
this.CheckPath(TestEnvironment.ReferenceOutputDirectoryFullPath);
}
[Fact] [Fact]
public void GetReferenceOutputFileName() public void GetReferenceOutputFileName()

Loading…
Cancel
Save