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: 06:48:42 05/10/00 Wed
Author: Michel
Subject: Re: about Transformations...
In reply to: Plinio 's message, "about Transformations..." on 15:42:28 05/09/00 Tue


Dear Plinio,

If you look at the brightness transform, the luminosity change is straight forward,

Luminosity := Luminosity + FPercent/100.0;

In the contrast, it is,

Theta := (Luminosity-0.5)*System.Pi;

Luminosity := Luminosity +
(((((Sin(Theta)+1.0))*0.5)-Luminosity)*Sign)*0.5;

A percentage value cannot be expressed. I don't recall from which reference I got the contrast change formula.

You are correct about the Apply method in the contrast and brightness transforms. Thanks for mentionning this to me. There is a one to one mapping to each pixel, so yes, it would conserve resources to apply directly on the source image. I have added this to my work list.

To add your own transforms, the simplest and most effective approach is simply to create a new unit, and derive you transform class from an appropriate base class. You don't need any DLL, package, etc...

Best regards

Michel

> some questions:
>
> 1) Why TConstrastTranformation hasn't a Percent like
> Brightness?
>
> 2) I read in your code:
> << { by default, Apply creates a new image, invokes
> ApplyOnDest, assigns the result to DibGraphic, and
> then frees the temporary image. This method should be
> overriden when the processing may occur directly on
> the image, converving resources. } >>
>
> why in some tranformations like contrast and
> brightness did not you redefine Apply?
>
> 3) I'd like to extend the library with my own
> transformations. What's the best way? Should I create
> a DLL, a package, a library ...
>
> Thanks,
> good work.
>
> Plinio

[ 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.