User Activity

  • Posted a comment on discussion General Discussion on Image32

    Just found out that the bug occur within the Img32.Fmt.JPG.pas -> LoadFromStream method. In the following line, Canvas.Handle occasionally becomes zero when called from background thread. img32.CopyFromDC(Canvas.Handle, Rect(0,0, Width, Height)); Then I realized the issue comes from the TJpegImage class. TJpegImage.Canvas.Handle occasionally becomes zero when called from a background thread. After searching more on the subject, I found following two links: https://en.delphipraxis.net/topic/1292-why-is-this-code-not-thread-safe-delphi-7/?do=findComment&comment=10765...

  • Posted a comment on discussion General Discussion on Image32

    Hi, I just noticed when loading jpeg from a non-ui thread (task) causes it to decoded to black image randomly. Following code demonstrate the issue. This issue mostly occur when I move the mouse on the main window. procedure TForm1.DecodeTaskHandler; var myImage: TImage32; begin while True do begin myImage := TImage32.Create(); if myImage.LoadFromFile('D:\small_white_image.jpg') then begin if myImage.Pixel[0,0] = Color32(clBlack) then MessageBox(0, 'Image decode failed','Error', 0); end; myImage.Free;...

View All

Personal Data

Username:
hasaranga
Joined:
2011-02-19 11:35:40

Projects

This is a list of open source software projects that Ruchira Hasaranga is associated with:

Personal Tools