ID:169179
 
After hours of painful work of trying to enlarge an icon by scale factor of 2 (in other words, stretching the icon so that it's double its size) all I've managed to achieve is being able to stretch the icon, by scale factor of 2, either vertically or horizontally. So my question; what is needed to make a single pixel be double its size?
Get each line of the icon into a list and then add it back to the icon doubled by shifting the second output either north or east...right?

-Ryan
In response to Ry4n
That effectively would give this wouldn't it?

O
CO

Where C is the original pixel/line and O is the copied version just shifted.
In response to DeathAwaitsU
Just use paint. =p
In response to Digital Samurai
No I'm not trying to edit/make icons. I'm trying to achieve this:

Icon Scaling by OneFishDown

I just need to know, what makes a pixel look doubled.
If it helps then here's my way of scaling you by a factor of 2 horizontally.

mob/verb/ScaleHorizontally()
var/icon/I = icon(usr.icon)
usr.icon = null
var/py = 0
var/px = 0
var/bottomshifter = 0
while(py<=31) //loop through every horizontal line
py ++
px = 0
bottomshifter = 0
while(px<=31) //loop through every pixel within the line
px++
var/icon/G = icon('Blank.dmi')
var/icon/H = icon('Blank.dmi')
var/icon/GH = icon('Blank.dmi')
var/icon/pixel = I.GetPixel(px,py) //get the pixel that we're working on
G.Blend(pixel,ICON_OR) //put that pixel on another icon
G.Shift(EAST,px,1) //move the pixel east, to our scaled location
H.Blend(pixel,ICON_OR) //make another icon with the pixel
H.Shift(EAST,bottomshifter,1) //move the new pixel east, directly to the left of where the other pixel was
GH.Blend(G,ICON_OR) //add the two pixels into one icon, they should now be right next to each other giving a strethched effect
GH.Blend(H,ICON_OR)
bottomshifter++
if(px>16) //after we do the above for 16 pixels, we now need to go above the 32x32 region
var/image/J = image(GH) //create an image
J.pixel_x = 32 //adjust the offset so that it's now going to be one icon to the right
usr.overlays += J //add it as an overlay
else
usr.overlays += GH //add it as an overlays


While on this subject by the way, I was wondering why it stops working after py = 16?
Maybe graphics will help?



The one on the left is the original. The one on the right is a doubled version of it. You'll notice that it isn't really doubled because it hasn't been enlarged upwards but only to the right. So using this, can someone answer my question?
In response to DeathAwaitsU
You'd want this:

OO
CO
In response to Xooxer
That is what I did with [link] but it only stretched horizontally.