File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes increasing the size of the image that is created by this program? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "increasing the size of the image that is created by this program?" Watch "increasing the size of the image that is created by this program?" New topic
Author

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

abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 635



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

Joined: Jan 28, 2003
Posts: 4181
    
  21

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.


Steve
abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 635
I didn't get the point may you give me example?
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11499
    
  16

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.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: increasing the size of the image that is created by this program?