C# 클래스 Imgix_Dotnet.Macros.FocalExtensions

Macros that work around focal points instead of the top left corner
파일 보기 프로젝트 열기: estei/Imgix-Dotnet

공개 메소드들

메소드 설명
FocalCrop ( this image, double x, double y, int width, int height, int sourceWidth, int sourceHeight ) : ImgixImage

Crops the image around a focal point. Will try and center on the focal point if possible, but if the crop falls outside the area of the image it will adjust. Keeps the aspect of the crop.

FocalCrop ( this image, int x, int y, int width, int height, int sourceWidth, int sourceHeight ) : ImgixImage

Crops the image around a focal point. Will try and center on the focal point if possible, but if the crop falls outside the area of the image it will adjust. Keeps the aspect of the crop.

FocalResize ( this image, double x, double y, int width, int height, int sourceWidth, int sourceHeight ) : ImgixImage

Resizes the image around a focal point Crops the image to the aspect ratio with the focal point as close to center as possible. Will not stretch the image to the width and height since this will just be a bigger picture with the same details.

FocalResize ( this image, int x, int y, int width, int height, int sourceWidth, int sourceHeight ) : ImgixImage

Resizes the image around a focal point Crops the image to the aspect ratio with the focal point as close to center as possible. Will not stretch the image to the width and height since this will just be a bigger picture with the same details.

메소드 상세

FocalCrop() 공개 정적인 메소드

Crops the image around a focal point. Will try and center on the focal point if possible, but if the crop falls outside the area of the image it will adjust. Keeps the aspect of the crop.
If either x or y is outside the 0.0 to 1.0 range
public static FocalCrop ( this image, double x, double y, int width, int height, int sourceWidth, int sourceHeight ) : ImgixImage
image this The image to run the macro on
x double /// The horizontal position of the focal point. /// Interpreted as a percentage of the image width from the left. /// Values 0.0 to 1.0 ///
y double /// The y position of the focal point. /// Interpreted as a percentage of the image height from the top side. /// Values 0.0 to 1.0 ///
width int The width of the area to crop
height int The height of the area to crop
sourceWidth int The original image width
sourceHeight int The original image height
리턴 ImgixImage

FocalCrop() 공개 정적인 메소드

Crops the image around a focal point. Will try and center on the focal point if possible, but if the crop falls outside the area of the image it will adjust. Keeps the aspect of the crop.
public static FocalCrop ( this image, int x, int y, int width, int height, int sourceWidth, int sourceHeight ) : ImgixImage
image this The image to run the macro on
x int The horizontal position of the focal point
y int The y position of the focal point
width int The width of the area to crop
height int The height of the area to crop
sourceWidth int The original image width
sourceHeight int The original image height
리턴 ImgixImage

FocalResize() 공개 정적인 메소드

Resizes the image around a focal point Crops the image to the aspect ratio with the focal point as close to center as possible. Will not stretch the image to the width and height since this will just be a bigger picture with the same details.
public static FocalResize ( this image, double x, double y, int width, int height, int sourceWidth, int sourceHeight ) : ImgixImage
image this The image to run the macro on
x double /// The horizontal position of the focal point. /// Interpreted as a percentage of the image width from the left. /// Values 0.0 to 1.0 ///
y double /// The y position of the focal point. /// Interpreted as a percentage of the image height from the top side. /// Values 0.0 to 1.0 ///
width int The width of the resulting image
height int The height of the resulting image
sourceWidth int The original image width
sourceHeight int The original image height
리턴 ImgixImage

FocalResize() 공개 정적인 메소드

Resizes the image around a focal point Crops the image to the aspect ratio with the focal point as close to center as possible. Will not stretch the image to the width and height since this will just be a bigger picture with the same details.
public static FocalResize ( this image, int x, int y, int width, int height, int sourceWidth, int sourceHeight ) : ImgixImage
image this The image to run the macro on
x int The horizontal position of the focal point
y int The y position of the focal point
width int The width of the resulting image
height int The height of the resulting image
sourceWidth int The original image width
sourceHeight int The original image height
리턴 ImgixImage