Home Products Download Order Contacts


Subject: Re: Zoom / Scale

"suntribe" wrote in message
> Hi every1..
> i'm trying to implement zoom capability in my app so i know how to do it,
> but i ran into some problems :)
> For zoom i use simple pixel replication (if it's called like that) :)
> newsize = x * oldsize..
> when i zoom out the picture, everything is ok.. but when i zoom in the
> picture, and if i zoom very large pictures (1280x1024) then i run out of
> memory :) i know why i get that message.. but how to do the zoom and not
> to
> run out of memory...
> one thought i came with is not to zoom entire picture, but to zoom only
> the
> part that is currently visible on the screen..
> Is there a better way to do a zoom on a picture?

This IS the better way. Try your own idea first!
For simplicity, constrain the zooming to 'whole' pixels -- clipping edge
pixels properly is slightly more difficult, and you may not need that



View All Messages in comp.graphics.algorithms

Zoom / Scale =>


Copyright 2006 WatermarkFactory.com. All Rights Reserved.