0
我需要在Android Studio中銳化圖像的圖像質量。 圖像的來源來自PDF文件。如何在我的Android應用程序中銳化位圖的圖像質量?
注意:當我放大頁面時 - 圖像銳化,當我在單個頁面中查看整個頁面時,它非常模糊。
如何使用圖像質量銳化?我已經閱讀了關於BitmapFactory的一些文章,但我不清楚如何實現它。 另外,BitMap工廠是我做這件事的最好方式嗎?
我對android還是比較新的,我感覺我的方式。 任何代碼示例和技巧都受到歡迎和讚賞。
注:我確實使用了一個來自互聯網的例子,因爲我正在教導自己如何做到這一點。
下面是我在應用程序代碼:
private void showPage(int index) {
if (mPdfRenderer.getPageCount() <= index) {
return;
}
if (null != mCurrentPage) {
mCurrentPage.close();
}
Bitmap bitmap = Bitmap.createBitmap(mCurrentPage.getWidth(), mCurrentPage.getHeight(),
Bitmap.Config.ARGB_8888);
mCurrentPage.render(bitmap, null, null, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
mImageView.setImageBitmap(bitmap);
updateUi();
}
謝謝!