/*
* Copyright 2019-2024 Soren Stoutner <soren@stoutner.com>.
*
- * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
+ * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android/>.
*
* Privacy Browser Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Store the current favorite icon height.
favoriteIconHeight = icon.height
- // Scale the favorite icon bitmap down if it is larger than 256 x 256. Filtering uses bilinear interpolation.
- favoriteIcon = if (icon.height > 256 || icon.width > 256) // Scale the icon before storing it.
- Bitmap.createScaledBitmap(icon, 256, 256, true)
+ // Scale the favorite icon bitmap down if it is larger than 128 in either direction. Filtering uses bilinear interpolation.
+ favoriteIcon = if (icon.height > 128 || icon.width > 128) // Scale the icon before storing it.
+ Bitmap.createScaledBitmap(icon, 128, 128, true)
else // Store the icon as presented.
icon
}