Pixel access

Michael Thaler michael.thaler at ph.tum.de
Mon Sep 27 21:29:10 CEST 2004


Hi Cyrille,

thank you very much for your explanation! Just one more question: right now 
the scaling code does iterate over a row, but over a column. Basically I need 
to do two things:

for (y=0;y<=height();y++){
 compute something at fixed x
}

and 

for (y=0;y<=height();y++){
 for (x=a,x<=a+2;x++){
  compute something
  // just an example, but here y runs from 0 to height and x only from say 42    
  to 44,
 }
}

Can I also access a colum with the iterators in an efficient way or is it 
better to rewrite the code so that it iterates over rows and not over columns 
(basically that would be o.k., to, but I would prefer to leave the code as it 
is now because it works so nicely).

Michael


More information about the kimageshop mailing list