Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-06

fpcanvas and Interpolation filters

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Looking at the 'fpcanvas' unit in FCL it seems we only have the Mitchel Interpolation implemented. Is this a correct assumption?

What about a few other types?
'Box' aka "Nearest Neighbour"
'Triangle' aka "Linear" or "Bilinear"
'Hermite'
'Bell'
'B-Spline'
'Lanczos3'

I have some pascal implementations for the others and if they are not part of FCL already, I can always create a patch to add them. Would this be a worthy effort?

Regards,
- Graeme -

Graeme Geldenhuys
to Graeme Geldenhuys

OK, I answered by own question. I found the 'extinterpolation' unit which contains a whole bunch of interpolation filters defined. :-)

Graeme.

Graeme Geldenhuys wrote 20 lines
Hi, Looking at the 'fpcanvas' unit in FCL it seems we only have the Mitchel Interpolation implemented. Is this a correct assumption? What about a few other types? 'Box' aka "Nearest Neighbour" 'Triangle' aka "Linear" or "Bilinear" 'Hermite' 'Bell' 'B-Spline' 'Lanczos3' I have some pascal implementations for the others and if they are not part of FCL already, I can always create a patch to add them. Would this be a worthy effort? Regards, - Graeme -
Michael Van Canneyt
to Graeme Geldenhuys: Looking at the 'fpcanvas' unit in FCL it seems we only have the Mitchel Interpolation…
Graeme Geldenhuys wrote
Hi, Looking at the 'fpcanvas' unit in FCL it seems we only have the Mitchel Interpolation implemented. Is this a correct assumption?

No. There is a second unit which implements other interpolations: extinterpolation. It registers the following interpolations:

TBlackmanInterpolation = class (TFPBaseInterpolation) TBlackmanSincInterpolation = class (TFPBaseInterpolation) TBlackmanBesselInterpolation = class (TFPBaseInterpolation) TGaussianInterpolation = class (TFPBaseInterpolation) TBoxInterpolation = class (TFPBaseInterpolation)
THermiteInterpolation = class (TFPBaseInterpolation) TLanczosInterpolation = class (TFPBaseInterpolation) TQuadraticInterpolation = class (TFPBaseInterpolation) TCubicInterpolation = class (TFPBaseInterpolation) TCatromInterpolation = class (TFPBaseInterpolation) TBilineairInterpolation = class (TFPBaseInterpolation) THanningInterpolation = class (TFPBaseInterpolation) THammingInterpolation = class (TFPBaseInterpolation)

Show quoted text 12 lines
What about a few other types? 'Box' aka "Nearest Neighbour" 'Triangle' aka "Linear" or "Bilinear" 'Hermite' 'Bell' 'B-Spline' 'Lanczos3' I have some pascal implementations for the others and if they are not part of FCL already, I can always create a patch to add them. Would this be a worthy effort?

Absolutely.
Make sure they don't overlap with the currently existing ones. Box and Lanczos seem to be there already.

You can implement them in the same unit btw.

Michael.

Michael.