Need Help : To zoom an image through interpolation

Hi Everyone,
I need some help.
i loaded the bitmap image file without any graphic api and now
I am trying to zoom image trough Linear or Neighbor Interpolation and bi linear interpolation.

Thanks& Regards

Anuj Awasthi

• : Hi Everyone,
: I need some help.
: i loaded the bitmap image file without any graphic api and now
: I am trying to zoom image trough Linear or Neighbor Interpolation
: and bi linear interpolation.
:
:
: Thanks& Regards
:
: Anuj Awasthi
:
I will just write the algo
let us suppose image in array image[x][y]
tmpimage[2x][y];
finalimage[2x][2y];
for j=0 , j<y , j++
(
z=0
for i=0 , i<x , i++
(
tmpimage[z][j] = image[i][j]
tmpimage[z+1][j] = image[i][j]
z = z+2
}
}

z = 0

for i=0 , i<x , i++
(
z = 0
for j=0 , j<y , j++
(
finalimage[i][z] = tmpimage[i][j]
finalimage[i][z+1] = tmpimage[i][j]
z = z+2
}
)

I think you can just change it to you needs.
I am have forgotton which interpolation is this but definately zooms and image.

Also for the mentioned transformation I think you could just play around with the image array
• : : Hi Everyone,
: : I need some help.
: : i loaded the bitmap image file without any graphic api and now
: : I am trying to zoom image trough Linear or Neighbor Interpolation
: : and bi linear interpolation.
: :
: :
: : Thanks& Regards
: :
: : Anuj Awasthi
: :
: I will just write the algo
: let us suppose image in array image[x][y]
: tmpimage[2x][y];
: finalimage[2x][2y];
: for j=0 , j<y , j++
: (
: z=0
: for i=0 , i<x , i++
: (
: tmpimage[z][j] = image[i][j]
: tmpimage[z+1][j] = image[i][j]
: z = z+2
: }
: }
:
: z = 0
:
: for i=0 , i<x , i++
: (
: z = 0
: for j=0 , j<y , j++
: (
: finalimage[i][z] = tmpimage[i][j]
: finalimage[i][z+1] = tmpimage[i][j]
: z = z+2
: }
: )
:
: I think you can just change it to you needs.
: I am have forgotton which interpolation is this but definately zooms
: and image.
:
: Also for the mentioned transformation I think you could just play
: around with the image array
:

Also I think I have seen Linear or Neighbor Interpolation and bi linear interpolation. code in matlab demos or sample or tutorial
just look for it in matlab image tutorial atleast you can get the algorithm
• I'm not sure this will help but i have a Vb .net Function that will allow you to zoom in or out at will.
You can get the source code from http://ess-image.com/Graphic/Image_Processing/ZoomImage.aspx
While you are there you may see some other image processing functions that will help you with your game programming.

I hope this helps you out
Al