BitmapFactory.Options.InScaled Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When this flag is set, if #inDensity
and
#inTargetDensity
are not 0, the
bitmap will be scaled to match #inTargetDensity
when loaded,
rather than relying on the graphics system scaling it each time it
is drawn to a Canvas.
[Android.Runtime.Register("inScaled")]
public bool InScaled { get; set; }
[<Android.Runtime.Register("inScaled")>]
member this.InScaled : bool with get, set
Property Value
- Attributes
Remarks
When this flag is set, if #inDensity
and #inTargetDensity
are not 0, the bitmap will be scaled to match #inTargetDensity
when loaded, rather than relying on the graphics system scaling it each time it is drawn to a Canvas.
BitmapRegionDecoder ignores this flag, and will not scale output based on density. (though #inSampleSize
is supported)
This flag is turned on by default and should be turned off if you need a non-scaled version of the bitmap. Nine-patch bitmaps ignore this flag and are always scaled.
If #inPremultiplied
is set to false, and the image has alpha, setting this flag to true may result in incorrect colors.
Java documentation for android.graphics.BitmapFactory.Options.inScaled
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.