Is it possible to resize sprite i.e. smaller to larger or larger to smaller without sacrificing detail?

Thanks for who ever answers.
Are you asking for code to do this or manually do this in a photo editor?
var/matrix/newMatrix = matrix()
atom.appearance_flags = PIXEL_SCALE
atom.transform = newMatrix
If you want a pixelated look, make sure scaling uses Nearest-Neighbor mode instead of something like Bilinear.