API Documentation
Documentation for developing SailfishOS applicationsResizeFilter QML Type
Resizes the content of a FilteredImage. More...
Import Statement: | import Sailfish.Silica.Background 1.0 |
Inherits: |
Properties
- fillMode : enum
- maximumScaleFactor : int
- size : size
Detailed Description
Note: This QML type is under development and is subject to change.
A ResizeFilter resizes the output of the previous filter step (or the input source) so all subsequent filters are applied to an image of that size. The implicit size of the final image will be determined by the size property of the last ResizeFilter and the fillMode.
When the image is resized the source image is sampled using a convolution filter. By default ResizeFilter chooses a filter which will produce a smooth image but this default can be overridden by assigning a preferred kernel to the ConvolutionFilter kernel property.
ResizeFilter { size { width: 256 height: 256 } fillMode: Fill.PreserveAspectFit }
Property Documentation
Determines how the output size should be adjusted to fit the desired size if the input size has a different aspect ratio.
The possible values are:
Fill.Stretch
The resized image will be stretched to fit the desired size exactly.Fill.PreserveAspectFit
The resized image may be smaller than the desired size in one dimension in order to retain the original sizes aspect ratio.Fill.PreserveAspectByExpanding
The resized image may be larger than the desired size in one dimension in order to retain the original sizes aspect ratio.
The default value is Fill.Stretch
Specifies the maximum amount an image should be scaled in single step. If an image has to be scaled by a larger amount it will be resized to an intermediate image and then scaled again.
size : size |
The output image size of the filter.
If the fillMode property is not equal to Fill.Stretch
the size may be adjusted to comply.