• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

New fiter

Started by jcarlos, 22 March 2008, 17:56:39

Previous topic - Next topic

jcarlos

Hi.
I think maybe could be included other filter to the file
ImagingCanvases.pas
I was needed to do it and I include 3 new filter, realy maybe two because the average filter for 3x3 and 5x5 is alredy included.

I send here the code for you. (I only send the segment of code that must to be put inside ImagingCanvases.pas like a methods of the "TImagingCanvas"  class)

You are free to use this code like you want. (The code is in the attach).
The code was tested in Lazarus for windows.

For make a test you can include it in the example named
LCLImager

And use the following code to call this methods.

procedure TMainForm.mnPromedioClick(Sender: TObject);
begin
if FImage.Format in FImageCanvas.GetSupportedFormats
      then Begin
              FImageCanvas.CreateForImage(FImage);
              FImageCanvas.ApplyAverage(3);
              UpdateView;
            End;

end;

Galfar

Thanks for the great contribution Juan!
I'll add Median and Threshold filters to Canvas (I'll see about the Avg).

I've wanted to add more filters (point and non-linear) to Canvas for ages but never had the time (working on other parts of library). If you ever add some more functions to Imaging, please don't hesitate to sen them.

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk