Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
triniwiz committed Jan 11, 2019
2 parents 7f314df + 5453036 commit c8c3792
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/image-cache-it.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ export class ImageCacheIt extends ImageCacheItBase {
this.resize.split(',').length > 1 &&
this.stretch !== 'fill'
) {
this.builder.resize(
parseInt(this.resize.split(',')[0], 10),
parseInt(this.resize.split(',')[1], 10)
);
this.builder.resize(layout.toDevicePixels(parseInt(this.resize.split(',')[0], 10)), layout.toDevicePixels(parseInt(this.resize.split(',')[1], 10)));
}
this.builder.into(this.nativeView);
}
Expand Down Expand Up @@ -170,10 +167,7 @@ export class ImageCacheIt extends ImageCacheItBase {
return resize;
}
if (resize && resize !== undefined && resize.split(',').length > 1 && this.stretch !== 'fill') {
this.builder.resize(
parseInt(resize.split(',')[0], 10),
parseInt(resize.split(',')[1], 10)
);
this.builder.resize(layout.toDevicePixels(parseInt(this.resize.split(',')[0], 10)), layout.toDevicePixels(parseInt(this.resize.split(',')[1], 10)));
}
return resize;
}
Expand Down Expand Up @@ -314,7 +308,7 @@ export class ImageCacheIt extends ImageCacheItBase {
};
}

this.builder.resize(newSize.width, newSize.height);
this.builder.resize(layout.toDevicePixels(newSize.width), layout.toDevicePixels(newSize.height));
}

private resetImage(reload = false) {
Expand Down

0 comments on commit c8c3792

Please sign in to comment.