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 > I need help - I can help
  New Posts New Posts RSS Feed - Unknown JPEG 2000 file type
  FAQ FAQ  Forum Search   Register Register  Login Login

Unknown JPEG 2000 file type

 Post Reply Post Reply
Author
Message
geonetwork View Drop Down
Team Player
Team Player
Avatar

Joined: 12 Mar 07
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote geonetwork Quote  Post ReplyReply Direct Link To This Post Topic: Unknown JPEG 2000 file type
    Posted: 15 Feb 18 at 9:43AM
Hi everybody,

I'm using Delphi Tokyo 10.2.2 and DebenuPDFLibrary 14.11 (I've tried with 13.12 also).

I'm using this simple code to load a graphics field into a TImage

Image1.Picture.Assign((FieldByName('IMAGE') as TGraphicField))

As soon as the unit DebenuPDFLibrary is included in a project, I get this exception: Unknown JPEG 2000 file type.

If I remove DebenuPDFLibrary unit then exception disapear.

Any ideas?
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2760
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 15 Feb 18 at 9:16PM
Where can we download and check the graphic file?
jpeg2000 is already supported for many years now...
What does QuickPDF in your delphi project?
A more complete code snippet would be useful.
Perhaps the question is how to fill the TGraphicField...

Cheers,
Ingo

Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 188
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 15 Feb 18 at 10:26PM
We really need to see some of your code to help with this.  You imply that merely including the unit causes the problem without adding any API calls to QuickPDF.  If this is true, then you need to look for a match between symbols defined in the QuickPDF API and those defined elsewhere in your application and used units. If you have duplicated names, you are likely to see an exception.  Perhaps altering the position of DebenuPDFLibrary in the units list will help you narrow this down, but it is unlikely to fix the real problem.

Finally, when you trace with the debugger using the debug Delphi DCU files, where precisely does the exception occur and what is in the stack at that moment?  As you move up the stack, do you see unexpected units being visited?
Back to Top
John Whitham View Drop Down
Beginner
Beginner


Joined: 20 Apr 16
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote John Whitham Quote  Post ReplyReply Direct Link To This Post Posted: 04 Oct 18 at 4:24PM
I have encountered this error when loading an picture into a TImage from stream saved out of QuickPDF. For me it came from not being specific about loading different types. So:

                if pdfdoc.ImageType in [1,3] then
                  image2.Picture.LoadFromStream(astream)
                else if pdfdoc.ImageType = 2 then
                  image2.Picture.Bitmap.LoadFromStream(astream);

works for TIFF, JPEG and BMP whereas

                image2.Picture.LoadFromStream(astream);

with a BMP gives the "Unknown JPEG 2000" error in TImage.loadfromstream.
Back to Top
geonetwork View Drop Down
Team Player
Team Player
Avatar

Joined: 12 Mar 07
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote geonetwork Quote  Post ReplyReply Direct Link To This Post Posted: 04 Oct 18 at 4:39PM
The issue has been fixed in 14.12 release.
Back to Top
geonetwork View Drop Down
Team Player
Team Player
Avatar

Joined: 12 Mar 07
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote geonetwork Quote  Post ReplyReply Direct Link To This Post Posted: 04 Oct 18 at 4:56PM
My case was different, but I solved replacing:

Picture.Assign((FieldByName('IMAGE') as TGraphicField));

with 

Picture.Bitmap.Assign((FieldByName('IMAGE') as TGraphicField));

I hope it can help you

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2760
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 04 Oct 18 at 7:21PM
Hi John,

jpeg2000-support seems to be complex stuff?
What's important regarding this issue is the QP-version you're using.
Jpeg2000-support was first introduced with version 7.26
An additional enhancement was released with version 8.16
The versions 10.16 and 15.11 came along with some fixes regarding jpeg2000-support.
If you're using a version before 15.11 or 10.16...

Cheers,
Ingo

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