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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Problem reading blob into TImageEnView
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

john_siggy@yahoo.com

USA
172 Posts

Posted - Jul 25 2025 :  14:33:27  Show Profile  Reply
Hey Nigel,

I am upgrading from 13.2.0 to 14.0.1 and my ImageenView now does not seem to import layers from a blob. Works fine in 13.2.0. Although there are many image layers in the blob, layersImport always returns 1 for one layer.
//
AnnotationIIBlobStream.Position := 0;
//
i := ImageEnView1.LayersImport('', AnnotationIIBlobStream, ioUnknown, False);


Your assistance is most appreciated...

xequte

39223 Posts

Posted - Jul 25 2025 :  19:33:01  Show Profile  Reply
Hi John

What is the type of content in the blob? If you specify ioUnknown it needs to infer the file format from its content. If you explicitly specify the format, does it work?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

john_siggy@yahoo.com

USA
172 Posts

Posted - Jul 25 2025 :  20:44:23  Show Profile  Reply
That was a good guess but unfortunately the problem persists. Changing ioFileType to ioIEN works on 13.2 but not the current version.
Go to Top of Page

xequte

39223 Posts

Posted - Jul 28 2025 :  00:08:46  Show Profile  Reply
Hi John

What is the type of content in the blob?

What code was used to fill it?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

john_siggy@yahoo.com

USA
172 Posts

Posted - Jul 28 2025 :  20:45:50  Show Profile  Reply
Hey Nigel,

There seems to be problem with: ImageEnView1.LayersImport('', AnnotationBlobStream, ioIEN, False).
used : ImageEnView1.IO.LoadFromStreamIEN(PushThreads[CamCam].AnnotationIIBlobStream) with success.

is there an example of holding the Ctrl key down to toggle auto-fit?
Go to Top of Page

xequte

39223 Posts

Posted - Jul 28 2025 :  23:52:08  Show Profile  Reply
Hi John

If the blob contains IEN content, then they will be imported as a single image. If you want to load the layers, you should use: ImageEnView1.IO.LoadFromFileIEN().

// Add a layer file as a merged image (as a single layer) to the current content
ImageEnView1.LayersImport( 'C:\Layers.ien', nil, ioIEN, True );

// Add all layers of a layer file (as separate layers) to the current content
ImageEnView1.IO.LoadFromFileIEN( 'C:\Layers.ien', True );



To toggle Auto-Fit with the Ctrl key you can use:

// Toggle auto-shrink when pressing the Ctrl key
procedure TForm1.ImageEnView1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if Key = VK_CONTROL then
  begin
    ImageEnView1.AutoShrink := not ImageEnView1.AutoShrink;
    if not ImageEnView1.AutoShrink then
      ImageEnView1.Fit()
    else
      ImageEnView1.Zoom := 100;
  end;
end;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: