• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 635
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



How can I increase the size of the image that is created by this program?
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't get the point may you give me example?
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Think of how dumb the average person is. Mathematically, half of them are EVEN DUMBER. Smart tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic