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: 27
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: 3524
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: 437
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: 27
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: 27
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: 3524
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
lsc82 View Drop Down
Beginner
Beginner


Joined: 07 Nov 18
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote lsc82 Quote  Post ReplyReply Direct Link To This Post Posted: 13 Nov 18 at 10:33AM

Hi,

I have this problem with QuickPDF 13.12. 

I use Report Builder (Digital Metaphors 19.2 - latest)

Only DECLARING DebenuPDFLibrary in the project - NOT USING IT - the report generation process with BITMAP image raise an error:

Unknown JPEG 2000 file type

The problem raise here:

// for bitmaps, call DataPipeline.GetFieldAsPicture
                 if (lGraphicClass = TBitmap) then
                   FPicture.Assign(DataPipeline.GetFieldAsPicture(DataField))  <--- ERROR!
                 else
                   begin
                     lGraphic := lGraphicClass.Create;
                     lGraphic.LoadFromStream(lImageStream);
                     FPicture.Graphic := lGraphic;
                     lGraphic.Free;
                   end;
HOW to SOLVE this problem?

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

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 13 Nov 18 at 8:01PM
Hi Isc,

if you're removing the declaration of QuickPDF then it works again?
Like i've told here before:
Perhaps a change to version 15.11 can fix it.

Cheers and welcome here,
Ingo



Edited by Ingo - 13 Nov 18 at 8:02PM
Cheers,
Ingo

Back to Top
lsc82 View Drop Down
Beginner
Beginner


Joined: 07 Nov 18
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote lsc82 Quote  Post ReplyReply Direct Link To This Post Posted: 14 Nov 18 at 1:08PM
Hi,

thanks for your reply, Ingo.

I understand "upgrade to solve" but this is not easy for us at this stage of our project (it was very hard to find the realtionship between YOUR component and the error on OTHER components, we spent MONTHS on it!!! AngryAngry )

What I don't really understand is HOW YOUR component interferes with an other one without being used, but only declared (perhaps it interferes with the BASIC delphi components!). 

I don't ask you to make a new 13.X version, solving this very dangerous behavior, but help us to do a work-around is a "minimum sign of comprehension". (We don't have your source code...)

Thanks


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

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 14 Nov 18 at 1:46PM
Hi Isc,

what do you think who i am? ;-)
I'm a user as you are...
This is a forum ... a user forum - Not a publisher forum.
If you want any changes you should enter the official support page to enter a technical question.

"...
if you're removing the declaration of QuickPDF then it works again?
..."

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