VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123456789[10] ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 07:28:41 04/04/00 Tue
Author: Michel
Subject: Re: Evaluating Envision Image Library
In reply to: Steven 's message, "Evaluating Envision Image Library" on 00:33:04 04/04/00 Tue


Hi Steven,

At the moment, this is not easily done. You would need to derive a class from TQuickSelectMouseHandler and assign an object of this class to the TImageScrollBox.MouseHandler property.

In the derived TQuickSelectMouseHandler you would need to obtain the coordinates, to later put the selection back in the original image after having a applied the gamma change. With such an operation you also need to make sure the image in the TImageScrollBox is not zoomed (or make the appropriate conversion).

I'm also working on an enhanced mouse handler which will be more flexible but it is not yet ready.

If you are interested, I will send you the mouse handling class, so you will be able to try this out. Just let me know directly by email.

Best regards,

Michel



> We are evaluating Envision Image Library for one of
> our new project. We have this requirement where the
> user can select an area of the image, apply Gamma
> transformation on that area.
>
> This can be easily done with Envision using the
> QuickSelect method like the below:
>
> procedure TEditForm.ImageScrollBoxQuickSelect(
> const Sender: TImageScrollBox; const Graphic:
> TDibGraphic);
> var
> Transform : TGammaTransform;
> GammaStr : String;
> Gamma : Double;
> begin
> if MessageDlg( 'Apply gamma effect ?',
> mtConfirmation, [mbYes, mbNo], 0) = mrYes then
> begin
> GammaStr := '1.0';
> if not InputQuery('Gamma', 'Gamma value (0.1 -
> 7.0)', GammaStr) then
> Exit;
>
> Gamma := StrToFloat(GammaStr);
>
> FUndoGraphic.Assign(Graphic);
> Transform := TGammaTransform.Create;
> try
> Transform.OnProgress := MainForm.OnProgress;
> Transform.Gamma := Gamma;
> Transform.ApplyOnDest(FUndoGraphic, Graphic);
> finally
> Transform.Free;
> end;
>
> MainForm.u_FDirty := True;
> ImageScrollBox.Redraw(True);
> end;
> end;
>
> However, we can't do 1 thing. How can we actually put
> this Gamma"ed" area back on the original selected
> area? What we want is to allow the user to apply the
> effect on the area we want.
>
> Please advise. Is it possible to be done using
> Envision?
>
> Steven,
> System Analyst
> ACNielsen Systems Asia Pacific.

[ Next Thread | Previous Thread | Next Message | Previous Message ]

[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.