From 56c556821b827ffb3982e54d479143277421d41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= <7822554+AlexTMjugador@users.noreply.github.com> Date: Thu, 17 Jul 2025 02:07:18 +0200 Subject: [PATCH] refactor(app-frontend): followup to PR #3999 (#4008) --- apps/app-frontend/src/helpers/skins.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/app-frontend/src/helpers/skins.ts b/apps/app-frontend/src/helpers/skins.ts index 9b5953f53..e31b67b1c 100644 --- a/apps/app-frontend/src/helpers/skins.ts +++ b/apps/app-frontend/src/helpers/skins.ts @@ -67,9 +67,8 @@ export async function determineModelType(texture: string): Promise<'SLIM' | 'CLA const armWidth = 2 const armHeight = 12 const imageData = context.getImageData(armX, armY, armWidth, armHeight).data - for (let index = 1; index <= imageData.length; index++) { - //every fourth value in RGBA is the alpha channel - if (index % 4 == 0 && imageData[index - 1] !== 0) { + for (let alphaIndex = 3; alphaIndex < imageData.length; alphaIndex += 4) { + if (imageData[alphaIndex] !== 0) { resolve('CLASSIC') return }