From: Jouke V. <jo...@pv...> - 2006-06-27 13:37:09
|
Hi Ed, > Oooh. I say! Now that looks really nice for all kinds of reasons! > Thanks for creating this My pleasure. If you encounter any bugs, let me know via CPAN's RT. > What's likely the best technique to handle an oversized image with a > small viewport in Image:Magick? I'm guessing that I will have to use a > static image and some slider bars to emulate the effect of a viewport on > a much larger sub image? Are there any other useful features in > Image::Magick which can help support the viewport kind of model? Well, you could take the original image, and crop (see the crop method in Image::Magick's documentation) pieces of it and put that in your window. When the user wants to scroll a whole page in any direction (north, east, south or west), you could crop again from the original, and if someone would just want to move in any direction for only a few pixels, maybe it's faster to crop that extra bit and add it to the copy you're already displaying. You can easily "montage" (see IM docs again) several pieces together... Since Wx::Perl::Imagick gives you more image manipulation possibilities, you could also choose to put a kind of compass on top of your image and let the user use that for navigation, or whatever you'd want. I usually get the best ideas for solving my Image manipulation issues by browsing through Image::Magick's documentation (a link to that can be found in the Wx::Perl::Imagick POD), and read what the various methods do. HTH, Jouke |