fix images that are too small from being rendered
This commit is contained in:
@@ -248,10 +248,7 @@
|
|||||||
new_profile_image.style.setProperty("--x-offset", "0px");
|
new_profile_image.style.setProperty("--x-offset", "0px");
|
||||||
new_profile_image.style.setProperty("--y-offset", "0px");
|
new_profile_image.style.setProperty("--y-offset", "0px");
|
||||||
|
|
||||||
x_dimension = max(bitmap.width, 360);
|
smaller_dimension = min(bitmap.width, bitmap.height);
|
||||||
y_dimension = max(bitmap.height, 360);
|
|
||||||
|
|
||||||
smaller_dimension = min(x_dimension, y_dimension);
|
|
||||||
diff_to_350 = 360 / smaller_dimension;
|
diff_to_350 = 360 / smaller_dimension;
|
||||||
|
|
||||||
image_width = bitmap.width * diff_to_350;
|
image_width = bitmap.width * diff_to_350;
|
||||||
|
|||||||
@@ -178,6 +178,7 @@
|
|||||||
top: calc(350px / 2);
|
top: calc(350px / 2);
|
||||||
width: var(--x-size);
|
width: var(--x-size);
|
||||||
height: var(--y-size);
|
height: var(--y-size);
|
||||||
|
image-rendering: pixelated;
|
||||||
}
|
}
|
||||||
|
|
||||||
#grab-area {
|
#grab-area {
|
||||||
|
|||||||
Reference in New Issue
Block a user