Game programming

Moderators: None (Apply to moderate this forum)
Number of threads: 2047
Number of posts: 5331

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Need Help : To zoom an image through interpolation Posted by anujkawasthi on 24 Sept 2008 at 5:28 AM
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.
Can anyone help me about this?
If you have any source code. Please help me.


Thanks& Regards

Anuj Awasthi
Report
Re: Need Help : To zoom an image through interpolation Posted by cosmic_egg on 25 Sept 2008 at 7:19 AM
: 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.
: Can anyone help me about this?
: If you have any source code. Please help me.
:
:
: 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
Report
Re: Need Help : To zoom an image through interpolation Posted by cosmic_egg on 25 Sept 2008 at 7:23 AM
: : 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.
: : Can anyone help me about this?
: : If you have any source code. Please help me.
: :
: :
: : 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
Report
Re: Need Help : To zoom an image through interpolation Posted by ess-image on 2 Sept 2009 at 10:18 PM
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





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.