This week's book giveaway is in the Testing forum.We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line!See this thread for details.
Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!

# increasing the size of the image that is created by this program?

abalfazl hossein
Ranch Hand
Posts: 635

How can I increase the size of the image that is created by this program?

Steve Luke
Bartender
Posts: 4181
22
You can just put each value in multiple times (for example, to make it 2x bigger, put each value in 4 times - 2x in the horizontal and 2x in the vertical). Or you could try to get a smoother zoom by using interpolation of values. This website provides some little bit of details on image interpolation and should provide at least enough information for further research.

abalfazl hossein
Ranch Hand
Posts: 635
I didn't get the point may you give me example?

fred rosenberger
lowercase baba
Bartender
Posts: 12234
36
well...if instead of outputting each point once, you output it twice, the picture should be twice as big. However, since pictures are two dimensional objects, you need to stretch it in both directions. the simplest way is to repeat the data you have. so this:

...O..O...
.....O.....
............

would become this:

......OO....OO......
......OO....OO......
..........OO..........
..........OO..........
.........................
.........................

The problem is that if you do this too many times, your image becomes VERY blocky - like when you zoom in on a picture on a computer. You may be able to interpolate the data points. I.e. if your original data is 0, 100,0, you may be able to calculate data points 'between' the original one, giving you something like 0,50,100,50,0 - which would give a smoother picture.