ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IEColorCurve1.AssignSource(ImageEnView.IEBitmap)
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

w2m

USA
1990 Posts

Posted - Aug 08 2018 :  11:45:27  Show Profile  Reply
TIEColorCurve.UpdateHistograms produces an exception in some projects... not all, but I can not determine why?

procedure TForm1.Curves1Click(Sender: TObject);
begin
  if Assigned(PageControl1.ActivePage) then
  begin
    ImageEnView := TImageEnView(PageControl1.ActivePage.Controls[0]);
    if Assigned(ImageEnView) then
    begin
      FormCurves := TFormCurves.Create(Self);
      try
        FormCurves.IEColorCurve1.AssignSource(ImageEnView.IEBitmap);
        if FormCurves.ShowModal = mrOK then
          FormCurves.IEColorCurve1.ApplyCurve(ImageEnView.IEBitmap); << Exception in  TIEColorCurve.UpdateHistograms
        ImageEnView.Update();
      finally
        FormCurves.Free;
      end;
    end;
  end;
end;

procedure TIEColorCurve.UpdateHistograms();
var
  bmp: TIEBitmap;
  iRow: PCurvesRGBArray;
  X, Y, RFill: Integer;
  iRGB: TRGB;
  iR, iG, iB, iZ: Byte;
begin
  if fBitmap.IsEmpty then
    Exit;

  if fPreviewValid then
    bmp := fPreviewBitmap
  else
    bmp := fBitmap;

  for Y := 0 to 3 do
  begin
    fHistogramsMax[Y] := 0;
    for X := 0 to 255 do
      fHistograms[Y, X] := 0;
  end;

  iRow := PCurvesRGBArray( bmp.Scanline[0]);
  RFill := Integer( bmp.Scanline[1]) - Integer(iRow);
  for Y := 0 to bmp.Height - 1 do
  begin
    for X := 0 to bmp.Width - 1 do
    begin
      iRGB := iRow[X]; << Exception


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development

xequte

38127 Posts

Posted - Aug 09 2018 :  03:13:16  Show Profile  Reply
Hi Bill

Is this in 8.0.1?

Is there an image or project you can give me to reproduce the issue?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

w2m

USA
1990 Posts

Posted - Aug 09 2018 :  09:44:06  Show Profile  Reply
Yes, The project with this problem is my Brush and Layers demo. I'll email you the project.

Thanks


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

xequte

38127 Posts

Posted - Aug 09 2018 :  18:29:39  Show Profile  Reply
Thanks Bill,

There is an issue that can occur in 64bit usage. I have pushed a fix to the Git repostory.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

w2m

USA
1990 Posts

Posted - Aug 10 2018 :  09:00:28  Show Profile  Reply
Thanks Nigel. If functions correctly now.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

w2m

USA
1990 Posts

Posted - Aug 10 2018 :  10:02:23  Show Profile  Reply
ImageEn Brushes and Layers Demo Update 4 08/10/2018: Added image processing, image analysis functionality and Color Curves. Note the current version of iexColorCurve.pas will not function with 64-bit compile. The problem has been fixed, so contact the developer if you need to use color curves with 64-bit or wait for the next official update.
Download Link: attach/w2m/201881095717_BrushTools.zip

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: