MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / resize

Method resize

packages/core/image-source/index.android.ts:373–378  ·  view source on GitHub ↗
(maxSize: number, options?: any)

Source from the content-addressed store, hash-verified

371 }
372
373 public resize(maxSize: number, options?: any): ImageSource {
374 const dim = getScaledDimensions(this.android.getWidth(), this.android.getHeight(), maxSize);
375 const bm: android.graphics.Bitmap = android.graphics.Bitmap.createScaledBitmap(this.android, dim.width, dim.height, options && options.filter);
376
377 return new ImageSource(bm);
378 }
379
380 public resizeAsync(maxSize: number, options?: any): Promise<ImageSource> {
381 return new Promise((resolve, reject) => {

Callers

nothing calls this directly

Calls 3

getScaledDimensionsFunction · 0.90
getWidthMethod · 0.80
getHeightMethod · 0.45

Tested by

no test coverage detected