Newsgroups: comp.lang.tcl,comp.windows.x,comp.graphics,sci.image.processing
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.sprintlink.net!EU.net!Germany.EU.net!eso.org!news
From: abrighto@ac3.hq.eso.org (Allan Brighton)
Subject: best scaling/scrolling method for large images ? (Tk internals)
X-Nntp-Posting-Host: ac3
Message-ID: <ABRIGHTO.95Apr6193657@ac3.hq.eso.org>
Lines: 36
Sender: news@eso.org
Organization: ESO - European Southern Observatory, Garching by Munich
Date: 06 Apr 1995 17:36:56 GMT
Xref: glinda.oz.cs.cmu.edu comp.lang.tcl:27358 comp.windows.x:96082 comp.graphics:74066 sci.image.processing:13835


Hi all,

I am working on a Tk widget (in C/C++) to display images (in
real-time) and I am wondering what is the best way to scroll and scale
such images ?

Lets say someone wants to zoom in on the image. Would you:

1) scale the entire image to an X pixmap and them clip it to the 
   viewing window as needed ? 
   (makes scaling slower, scrolling faster)

2) try to only scale the portion of the image being viewed and do the 
   rest on the fly while scrolling ? 
   (makes scaling faster, but scrolling slower - and complicated)

3) use an X pixmap of some size (say 1000x1000) and when the user scrolls 
   past the end, rebuild it from a different part of the image ? 
   
4) other ideas ?


The problem is that it should be fairly fast since new images are
constantly being read from shared memory from a digital camera...
 
Thanks,
-- 

Allan Brighton
Free-lance Software Consultant
Munich, Germany

abrighto@eso.org (work)
allan@piano.sta.sub.org (home)

