In Byond 509, this worked perfectly. The image was scaled down to the desired size with minimal loss of detail, and was essentially an area of higher pixel density than the rest of the world
But before i could merge this, we updated our codebase to byond 510, and something changed, its completely broken. Image scaling seems to have been drastically changed
Now when the image is scaled down, byond seems to cut random pixels out of the icon to make it fit as it scales, maintaining the pixel density and completely destroying the detail. My icons have the same pixel density as the surroundings and they look awful.
Does anyone have any idea what changed to cause this? Is it something i can fix through code or client settings?
Here's an example of one of my icons at normal size
http://i.imgur.com/e5y56ao.png
and here's how it looks ingame right now, scaled to 0.4
http://i.imgur.com/8UugDax.png
And here's how it looked in byond 509, note the preserving of details:
http://i.imgur.com/J8smlwq.png
In the current version, the C is distorted and the silver pips are just gone. This has been utterly destroyed by whatever new thing byond is doing
Rather than simply downsampling the icon and rendering it as best as the monitor can allow, byond is cutting out pixels to maintain pixel density with the rest of the world, and this seems to have broken the ability to make more detailed objects in the same space
This is not how it worked in byond 509, that's the most critical thing here. Something has changed and broken it, and broken content with it. i really need an explanation and hopefully a workaround
Why is this happening?
It might be relevant how i'm doing it, in case different code options produce different results:
//-------------------
hud_list[ID_HUD] = image('icons/mob/hud_security.dmi', src, "hudunknown")
hud_list[WANTED_HUD] = image('icons/mob/hud_security.dmi', src, "hudblank")
//Scaling down the ID hud
var/image/holder = hud_list[ID_HUD]
holder.transform *= 0.4
holder.pixel_x = -20
holder.pixel_y = 0
hud_list[ID_HUD] = holder
holder = hud_list[WANTED_HUD]
holder.transform *= 0.4
holder.pixel_x = -20
holder.pixel_y = -10
hud_list[WANTED_HUD] = holder
//---------------
This is the relevant parts of the code. We basically create an image, and then apply transforms and pixel offsets to it afterwards
The base icon file is 32x32, i'm scaling the image down to a screen area of roughly 13x13 pixels. Byond pixels that is, it takes a far larger number of actual pixels on any monitor and there's easily room to render more detail. Byond seems to be scaling the image down to 13x13 first, losing pixels as it goes, and then blowing that up into the onscreen size, which is dumb and destructive
What's even worse, is the original 509 image linked above, that's even smaller - its a 16x16 pixel image scaled to 65% (10.4 pixels). I'm certain this isn't responsible for it though, i checked it before and after the 510 update with no changes. whatever 510 has done to image scaling has caused this and it looks awful
Can i do anything about it?