skinsdb
skinsdb copied to clipboard
Generated preview doesn't recognize 128x128 resolution images, only 64x64
64x64 resolution skins generated preview looks fine, but not for 128x128
I noticed that too. Is it possible to add support for it in the next release?
Possible fix by downscaling the images:
diff --git a/skin_meta_api.lua b/skin_meta_api.lua
index 1ce04ed..a6e7fc5 100644
--- a/skin_meta_api.lua
+++ b/skin_meta_api.lua
@@ -94,7 +94,12 @@ function skin_class:get_preview()
return self._preview
end
- local player_skin = "("..self:get_texture()..")"
+ local player_skin
+ if self:get_meta("format") == "1.8" then
+ player_skin = "\\("..self:get_texture().."\\^\\[resize\\:64x64\\)"
+ else
+ player_skin = "\\("..self:get_texture().."\\^\\[resize\\:64x32\\)"
+ end
local skin = ""
-- Consistent on both sizes:
Feedback is welcome.
Since this is for the preview, looks like a clean way to fix it. I'll test as soon as I have a chance on a local world.