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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Jpeg2000 saving to stream problem

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Patrick Quinn Posted - Jul 15 2017 : 12:59:27
I am using this code to save images to an Absolute Database table.
procedure TfrmMain.btnWriteClick(Sender: TObject);
var
  BlobStream: TABSBlobStream;
  MemStream: TMemoryStream;
begin
  MemStream := TMemoryStream.Create;
  try
    ImageEnView1.IO.SaveToStreamJP2(MemStream); //  Program freezes at this line
    //ImageEnView1.IO.SaveToStreamJ2K(MemStream);  // Program freezes at this line
    //ImageEnView1.IO.SaveToStreamJpeg(MemStream);  //  Works properly

    //ImageEnView1.IO.SaveToStream(MemStream, ioJP2); //  Program freezes at this line
    //ImageEnView1.IO.SaveToStream(MemStream, ioJ2K); // Program freezes at this line
    //ImageEnView1.IO.SaveToStream(MemStream, ioJPEG);  //  Works properly
    MemStream.Position := 0;
    //  Now save to blobstream
    with tblMain do
      begin
        Insert;
        BlobStream := TABSBLOBStream(CreateBlobStream(FieldByName('Image'), bmWrite));
        try
          MemStream.SaveToStream(BlobStream);
        finally
          Blobstream.Free;
        end;
        Post;
      end;
  finally
    MemStream.Free;
  end;

end;
All SaveToStream methods for Jpeg2000 work when saving small images, but on larger images (eg from my Nikon 3200 camera, 6016x4000 pixels), the program freezes at the point when SaveToStream is called for all JPEG2000 methods.

SaveToStream Jpeg works without any problems.

Is there a bug in the SaveToStream for Jpeg2000 methods, or am I doing something wrong?

(ImageEn 7.0.0, Delphi 10.2 Tokyo, target Win64)
4   L A T E S T    R E P L I E S    (Newest First)
Patrick Quinn Posted - Jul 18 2017 : 18:07:43
Hi Nigel

No, 32 bit is slower still.

It's not important. I was just experimenting as I understand that you can use higher compression with JP2000 than JPEG for the same quality but if there's a speed hit I'm happy to use JPEG instead.
xequte Posted - Jul 18 2017 : 04:16:20
Hi Patrick

Slower than 32bit?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Patrick Quinn Posted - Jul 17 2017 : 16:28:20
Apologies, I wasn't using the latest ielib64.dll.

It is now works, although is very slow.
xequte Posted - Jul 16 2017 : 19:24:33
Hi Patrick

Your code looks correct, but I cannot get it to freeze at the point you mention. Are you sure you have copied the latest version of ielib64.dll to your exe folder? Does it work if you use a Win32 target?

You could also try stepping into the ImageEn code to see where it fails (i.e. by adding the ImageEn source code folder to your Library path).





Nigel
Xequte Software
www.xequte.com
nigel@xequte.com