none
Shapes.Zoom() error RRS feed

  • Question

  • Iv found a conversion error in the Shapes.Zoom() level starting at level 0.4.

    I using a 256x256 .png file as the source and zooming it with the Shapes.Zoom() command, then resizing the graphic window to fit the zoomed picture.

    The actual zoomed picture size is off (smaller) by 1 pixel at 0.4, and jumps to 2 pixels at 0.6 zoom level.

    I can only guess that the zoom error gets worst as you get closer to 20 zoom level.

    Just a thought but why use a interpolated value for the zoom level in the first place  ?

    Wouldn't literal zoom values be better ?, ie Shapes.Zoom(pic,32,40,[0]), [0] = literal, [1] = % . ( im using the zoom level to adjust the screen size to fit the zoomed graphic.)( maybe a backwards process, i dont know...)

    I found this because the zoomed graphic and the window size didn't proportionally match each other.

    This little error wont hurt much, but if someone is looking to do precision graphics, they mite be annoyed by it.

    Tuesday, April 6, 2010 4:09 AM

Answers

  • Hot_Rod,

    Sounds like a rounding issue to me rather than a bug, but seeing as SmallBasic doesn't have a 'save image' option then I doubt if anyone will be doing precision graphics using SB. 

    • Proposed as answer by Davey-Wavey Tuesday, April 20, 2010 9:21 PM
    • Marked as answer by litdevModerator Thursday, April 22, 2010 9:26 PM
    Tuesday, April 6, 2010 10:44 AM