Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - PdfLibrary v10: Bug when adding PNG
  FAQ FAQ  Forum Search   Register Register  Login Login

PdfLibrary v10: Bug when adding PNG

 Post Reply Post Reply
Author
Message
Walther View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Aug 15
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Walther Quote  Post ReplyReply Direct Link To This Post Topic: PdfLibrary v10: Bug when adding PNG
    Posted: 20 Aug 15 at 8:41AM
DebenuPDFLibraryPNG.pas has a function TPNGReader.FilterData where there's a code snip like this:
  ...
    SetLength(FAlphaData, AlphaDataByteCount * FHeight);
    if Length(FImageData) > 0 then
    begin
      FillChar(FAlphaData[1], Length(FAlphaData), 0);
    end;
  ...

This code is buggy and should most likely be:
  ...
    SetLength(FAlphaData, AlphaDataByteCount * FHeight);
    if Length(FAlphaData) > 0 then                 // FAlphaData replaced here!!!
    begin
      FillChar(FAlphaData[1], Length(FAlphaData), 0);
    end;
  ...

This caused some confusion within our development team. Wink If this is not fixed in version 11, you could probably merge in the fix there.
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 20 Aug 15 at 9:27AM
Hi Walther,

Yes, you are correct, that appears to be a mistake. We'll fix that in the next release. Thanks!

Just be careful posting source code on forums, this is only a small snippet so not a big deal but preferably just post the version number, filename and line number with suggested change. If there's a bigger suggested change better to email Debenu directly.

Cheers,
- Rowan.
Back to Top
Paul View Drop Down
Moderator Group
Moderator Group


Joined: 25 Jun 14
Location: Slovakia
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paul Quote  Post ReplyReply Direct Link To This Post Posted: 06 Nov 15 at 8:58AM
Hi Walther,

The issue was fixed and the solution is available in the version 12.11. You can download it form here:

http://www.debenu.com/products/development/debenu-pdf-library/trial/
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store