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
 ImageEnDbVect

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
mdgodfrey Posted - Aug 12 2014 : 11:57:37
I am trying to load tiff data from an existing table (data not created with ImageEn). I can connect and display the images with an ImageEnDBView component and all is well. When I try to display the same data with an ImageEnDBVect component the image does not display. Both components have AutoDisplay set to true and are connected to the same Datasource.

Any thoughts on what I am missing?
I want to add annotations to the data with the ImageEnDBVect component.
9   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 28 2014 : 02:01:48
Hi

Yes, that might be the case. Ensure the form is fully instantiated before using FitToWidth.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
mdgodfrey Posted - Aug 27 2014 : 20:39:41
On the FitToWidth issue it seems that the ImageEnDBVect component has to be visible before FitToWidth will make a change.
If I put FitToWidth in the Form.OnResize event it has the desired effect. It does not work in Form.OnShow however.
mdgodfrey Posted - Aug 27 2014 : 20:19:03
I appreciate the response and help.

In response to using the Update method. It would not display the Tiff without that before. Using the code you provided however does display properly without using update.

There still is the problem with the initial FitToWidth however.
I modified to code to ensure that Shrink and Stretch were disabled but it still won't FitToWidth until the second Tiff load.

My Code modification:
try
 ImageEnDBVect1.LockUpdate;
 BlobField := tbScan.FieldByName('FullImage') as TBlobField;
 BlobStream := tbScan.CreateBlobStream(BlobField, bmRead);
 BlobStream.Position := 0;
 ImageEnDBVect1.IO.LoadFromStreamTIFF(BlobStream);
 ImageEnDBVect1.AutoStretch := False;
 ImageEnDBVect1.AutoShrink := False;
 ImageEnDBVect1.FitToWidth;
finally
 ImageEnDBVect1.UnlockUpdate;
 BlobStream.Free;
end;


Thanks much
xequte Posted - Aug 27 2014 : 16:35:36
Also, for other readers of this post. I forgot to mention the DB helper functions in iexHelperFunctions.pas (see your ImageEn source folder).

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Aug 27 2014 : 16:31:00
Hi

Are you sure that AutoFit and AutoShrink are set to false?

Also, you should not need to call update.

Use:
begin
  try
    ImageEnDBVect1.LockUpdate;
    BlobField := tbScan.FieldByName('FullImage') as TBlobField;
    BlobStream := tbScan.CreateBlobStream(BlobField, bmRead);
    BlobStream.Position := 0;
    ImageEnDBVect1.IO.LoadFromStreamTIFF(BlobStream);
    ImageEnDBVect1.FitToWidth;
  finally
    ImageEnDBVect1.UnlockUpdate;
    BlobStream.Free;
  end;
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
mdgodfrey Posted - Aug 27 2014 : 06:19:04
Thanks for the help.

I have a question about the way I am implementing loading Tifs.
It is now loading images but the FitToWidth only works after the first image is loaded. I have not been able to find a place in my code to get it to be recognized with the first image. Any thoughts on that?

I am using the following code:
procedure TfrmTIFViewer.tbScanAfterScroll(DataSet: TDataSet);
Var
 BlobStream : TStream;
 BlobField : TBlobField;
begin
 try
  BlobField := tbScan.FieldByName('FullImage') as TBlobField;
  BlobStream := tbScan.CreateBlobStream(BlobField, bmRead);
  ImageEnDBVect1.IO.LoadFromStreamTIFF(BlobStream);
  ImageEnDBVect1.FitToWidth;
  ImageEnDBVect1.IO.Update;
 finally
  BlobStream.Free;
 end;
end;



Thanks
xequte Posted - Aug 21 2014 : 16:58:33
Hi

Thanks for sending the demo. There are some differences between the methods used for I/O between the two components. I am currently investigating a resolution.

In the meantime, you may want to load directly from a blobstream:

http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=483



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Aug 14 2014 : 20:56:03
Hi

Both use virtually the same code, so it is hard to see why you might be getting a different result. Have you tried stepping through the ImageEn source code to see where it is failing?

Otherwise, you might want to send us a small demo that shows the issue.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
mdgodfrey Posted - Aug 14 2014 : 09:51:18
I notice no response on this question.
Not sure about that. I am wondering if the question is confusing or trivial or just no one knows?

Any help would be greatly appreciated!

It seems like both components should show the same result. The one thing that makes me wonder is that the ImageEnDBVect has a LoadedFieldImageFormat property that seems like maybe that data has to be stored with the image? Is that the difference and where my data was created with another application that it is not there?

Again any help appreciated.