ID:1745842
 
Keywords: icon, sizechange
(See the best response by Mr_Goober.)
Problem description:

How to alter an icon's size, like changing a 32x32 icon to 64x64(making it two times bigger)
Uh, this isn't really a detailed question. I am not exactly sure what you are looking to do but here are some things that may do the job.

Q: How do I change the icon size?
A:
world
icon_size=[number here] // change "[number here]" to a number

Q: How do I make a 64x64 icon?
A: Simply pixel the icon at a 64x64 size in a pixel editing program.

Q:How do I make 64x64 icon in Dream Maker?
A: Change the size values in the icon editor and then create.

Q: How do I change a x32 icon into an x64 icon during runtime?
A: Change the matrix.
     change_size()
animate(i,transform=matrix()*2) // i is the icon or object

(Something along these lines, read up on matrix)
Simply alter the icons size in the dmi file, but if it isn't letting you just create a new dmi file, uncheck the "use size from file" box then set the size to what you want, then import the icon.

Or you can use a proc to resize icons at runtime. Look up Scale()
ah, sorry for my vagueness, let's see....i basically want to make an icon of a small ball, of size 16x16 into a large ball icon of size 64x64 at runtime or without altering the actual file in an editor


I'll do as WSHGC suggested and look up Scale() and also try Akto's suggestions. Thanks in advance for your help
Scale() seems to be what i was looking for thanks for your help
Best response
There are a couple ways to scale your icon.

One such method would be to use the icon method Scale(). This stretches an icon to the provided dimensions. Example:
proc/ScaleIcon (atom/a)
var/icon/i = a.icon
i.Scale (64,64)


You can also use the atom's transform matrix:

proc/ScaleTransform(atom/a)
var/t = a.transform
t.Scale (2,2)


nice, thanks for the advice and sample
There are pros and cons of each method mind you. If you use icon.Scale(), you get clean, nearest neighbor scaling. However using it is resource heavy and needs to be downloaded to every client who sees it.

On the other hand using transform.Scale () uses far less CPU, and doesn't require caching. The bad news is that scaling up causss the icon to look blurred due to bilinear interpolation.
hmm... i will probably use transform.Scale() then. I don't want to put too much strain on my current hosting pc
If it isn't a thing you use often, icon scaling is fine. It is only a problem when used excessively.
hmmm...there's a chance it can be excessively but i'll check out both and see how they look then decide
There's a trick to scaling graphics without blurring them, but it's not feasible in all situations (it would be in this case). Start with the graphic as large as you'll need it, then you can scale it down and up to that largest size without any blurring.
Thanks, had just got that same problem when the circle i was making larger had suddenly become a square and was coming back to ask again.