> else
> begin
> if c>200 then // adjustment attempt for high intensity values :(
> value := 2*value /3;
> i := round(c * value);
> Minmax(i, 0, 255);
> result := i;
> This section of code looks weak.
> For the lighten case, value is from LADJUST, i.e. either 1.8, 1.73, 1.6,
> 1.4.
> You then change this value directly, with no reason to 2*value/3. I can
see
> no example of you using LADJUST except for this.
> .
> procedure minmax(var i : Integer; mn, mx : Integer);
> begin
> if i > mx then i := mx;
> if i < mn then i := mn;
> end;
> is declaring i as a local variable, which doesn't change the global i
> variable, i.e. i is the same i as before calling minmax.
> which you assign to result.
> Try minmax as a function ( and call it boundary, minmax usually means
> MinMax(4,5) gives Min=4 Max=5;)
> function Boundary(number,lowerrange,upperrange:integer):integer;
> begin
> if number>upperrange then Boundary:=upperrange;
> if number<lowerrange then Boundary:=lowerrange;
> Boundary:=number;
> end;
> and
> i := round(c * value);
> result:=Boundary(i, 0, 255);
> Hope this works.
> --
> Jon Perry
> pe...@globalnet.co.uk
> Jon Perry <pe...@globalnet.co.uk> wrote in message
> news:7v7nf4$j7022@forums.borland.com...
> > I haven't received any such email!
> > --
> > Jon Perry
> > pe...@globalnet.co.uk
> > KevanB <k...@a-t-f.demon.co.uk> wrote in message
> > news:7v6pbt$d744@forums.borland.com...
> > > Jon, I have emailed the source code directly to you, rather than
clutter
> > up
> > > this NG.
> > > KevanB