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

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - carlangas

1
Sorry, maybe I'm late to post it, but I have been testing it a little and noticed that the background color when rotating is black. Is it possible to select another color? I didn't play much with the library, but I think it would be nice.

Thanks, you are doing a very good job.
2
It would be nice if Rotate could accept any integer value between 0 and 360.
3
Help & Questions / Re: Adjusting color levels
5 November 2008, 16:40:04
I tried it in lazarus under linux (x86 and amd64) getting the errors I wrote before.
4
Help & Questions / Re: Adjusting color levels
27 September 2008, 20:51:28
It happened with any image. For example, the last image I was using was lazarus.jpg. You can find it in your lazarus installation, inside of components/jpeg/examples/.

The exception happened when Result was less than 0, so I just control its value, and in that case, assign 0 to this.

Didn't it happen to you?

Do you think calculating these parameters before calling the function could make it faster? As I said before, I don't get anything consistent.
5
Help & Questions / Re: Adjusting color levels
23 September 2008, 21:19:46
Well, MidPoint, at least in The Gimp can be up to 10.0.

I get the same exception, but I have made some changes and now it runs great. The first one tries to do less operations, but I don't really know if I get that (every time I run the function it takes a different time).

procedure TImagingCanvas.AdjustColorLevels(BlackPoint, WhitePoint, MidPoint: Single);
begin
  PointTransform(TransformLevels, BlackPoint, WhitePoint-BlackPoint, 1.0/MidPoint);
end;


function TransformLevels(const Pixel: TColorFPRec; BlackPoint, Divisor, Exponente: Single): TColorFPRec;

begin
  Result.A := Pixel.A;
if Pixel.R>BlackPoint then
  Result.R := Power((Pixel.R - BlackPoint) / Divisor, Exponente)
else
  Result.R:=0.0;
if Pixel.G>BlackPoint then
  Result.G := Power((Pixel.G - BlackPoint) / Divisor, Exponente)
else
  Result.G:=0.0;
if Pixel.B>BlackPoint then
  Result.B := Power((Pixel.B - BlackPoint) / Divisor, Exponente)
else
  Result.B:=0.0;
end;
SMF spam blocked by CleanTalk