Need Help : To zoom an image through interpolation - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# Need Help : To zoom an image through interpolation

Posts: 14Member
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

• Posts: 12Member
: 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
• Posts: 12Member
: : 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
• Posts: 4Member
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