Scaling contest

Michael Thaler michael.thaler at ph.tum.de
Thu Jun 30 23:29:49 CEST 2005


On Thursday 30 June 2005 23:15, Michael Thaler wrote:

Two more remarks: should we rename the Filter filter to linear filter in the 
dialog? Because I think that is what it is?

Also, the code from the Graphic Gems book on which my code is based has some 
improvements over the straight-forward version presented in the book:

		- Horizontal filter contributions are calculated on the fly,
		  as each column is mapped from src to dst image. This lets 
		  us omit having to allocate a temporary full horizontal stretch 
		  of the src image.

		- If none of the src pixels within a sampling region differ, 
		  then the output pixel is forced to equal (any of) the source pixel.
		  This ensures that filters do not corrupt areas of constant color.

		- Filter weight contribution results, after summing, are 
		  rounded to the nearest pixel color value instead of 
		  being casted to Pixel (usually an int or char). Otherwise, 
		  artifacting occurs. 

Michael


More information about the kimageshop mailing list