When scaling images that are not in the RSC file by default, the Scale function for the icon datum will not function correctly the first time a user logs into the server. The first time when a user (so when they download the image file from the server, it will not scale correctly but instead crop from the top left. To fix this, a player must relog and it seems to fix itself. This can only be replicated if a user clears their cache.
Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem:
var/icon/T = icon("maxresdefault.jpg") //image or directory does not matter
var/obj/B = new //to set the new rescaled image too.
T.Scale(60,120) //This can be set to anything and the same problem will produce.
B.icon = T
B.loc = usr.loc //Shows the result.
Expected Results:
The image scales to the requested size stated in the code on the first login and first download of the resource.
Actual Results:
The image instead of scaling, scales to the request size but instead of scaling the image, only crops to that size from the top left.
Does the problem occur:
Every time? Or how often? Just the first time the resource is downloaded to the client's machine.
In other games? Not that I know of.
In other user accounts? Yes.
On other computers? Yes.
When does the problem NOT occur?
I've not yet found a way that the problem doesn't occur so I cannot be much help here. The only way for the problem not to occur is if the dmb is launched in Dream Seeker first.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
This problem is present in previous versions of BYOND. The problem still persisted at 500.1205
Workarounds:
Relogging seems to be the only way to fix this issue.
https://drive.google.com/ open?id=0B_tggsDW3UCndVlkdXJPVEhNcVE