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
 Oracle Blob with TIFF & Reportbuilder
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

charlie1972

Hungary
3 Posts

Posted - Jun 02 2012 :  17:38:07  Show Profile  Reply
Hello to all of You,
I'd like ask some help. I have stored TIFF data in an Oracle BLOB field.
I have to print this picture via Delphi Report Builder created by Digital-Metamorph. This reporting component does not handle TIFF, but it has a image component with loadfromstream attribute and has canvas.
I have saved the TIFF blob data into a STREAM variable, now I'd like to make a convertion into JPEG stream with this ImageEn package. But I have no idea how I have to start it.
Please somebody could help me.

Thx,



Charlie

fab

1310 Posts

Posted - Jun 03 2012 :  00:47:30  Show Profile  Reply
Hello,
if TIFF contains a single page you could write:

  with TImageEnView.Create(nil) do
    try
      IO.LoadFromStreamTIFF( inStream );  // is inStream at position 0? Otherwise you need inStream.Position := 0
      IO.SaveToStreamJpeg( outStream );
    finally
      Free();
    end;

  // now reset outStream position and read it in your image component
  outStream.Position := 0;
  ...etc...


That code also assumes the original TIFF is 24 bit RGB, otherwise a color conversion is necessary.
Go to Top of Page

charlie1972

Hungary
3 Posts

Posted - Jun 13 2012 :  03:01:48  Show Profile  Reply
Fabrizio!

You are the greatest ever. I'm very grateful for Your help. It is working perfectly.

Thx

Charlie
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: