Knowit.FocusPoint 2.0.0

dotnet add package Knowit.FocusPoint --version 2.0.0
                    
NuGet\Install-Package Knowit.FocusPoint -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Knowit.FocusPoint" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Knowit.FocusPoint" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Knowit.FocusPoint" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Knowit.FocusPoint --version 2.0.0
                    
#r "nuget: Knowit.FocusPoint, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Knowit.FocusPoint@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Knowit.FocusPoint&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Knowit.FocusPoint&version=2.0.0
                    
Install as a Cake Tool

Knowit Focus Point

Adds PrecentageCoordinates property type for Optimizely that can be used to define FocusPoint property for ImageFile type that gives editors ability to specify focus point of image.

Installation

In order to install it use following command:

dotnet add package Knowit.FocusPoint --source https://www.myget.org/F/creuna-nuget/api/v3/index.json

Usage

Define FocusPoint property for image file, example:

    [Display(Order = 10, Name = "Focus point", Description = "Choose the focus point of an image")]
    public virtual PercentageCoordinates? FocusPoint { get; set; }

Use focus point property to specify image resize query.

Migration from Creuna.FluidImages

In order to migrate focus point data from old Creuna.FluidImages to the new type from Knowit.FocusPoint a property type conversion must be defined as in the example below:

public class Startup
{
...

    public void ConfigureServices(IServiceCollection services)
    {
        ...

        services.Configure<PropertyTypeConversionOptions>(x => x.ChangePropertyBackingTypeConversions.Add(
            new ChangePropertyBackingTypeConversion
            {
                OldTypeName = "Creuna.FluidImages.PercentageCoordinatesBackingType, Creuna.FluidImages",
                NewTypeName = typeof(PropertyPercentageCoordinates).AssemblyQualifiedName,
            }));

        ...
    }

...
}

Known issue: After the first run you will get property type casting error which is a known issue not fully handled yet. A workaround is to restart web application manually (it's a one time action).

Note: Once conversion is performed (in all environments) the property type conversion above can be safely removed. It safe to keep it but recommended to keep start up clean.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 348 5/4/2026
1.0.1 114 5/4/2026

2.0.0
       Target framework is updated to .net 8.0

       1.0.1
       Remove redundant file references after package installation

       1.0.0
       First release