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
 Convert multi-page TIFF to multi-page JPeg
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Agent86

USA
3 Posts

Posted - Aug 30 2011 :  19:06:17  Show Profile  Reply
ImageEn 3.x and ImageEn 4.x

I need to append multi-page TIFFs to an exisitng PDF. The TIFF files are huge.

I need to convert the multi-page TIFFs to a multi-page JPeg. Is that possible? I'm new to imaging.

Thanks

fab

1310 Posts

Posted - Aug 30 2011 :  22:28:33  Show Profile  Reply
quote:
I need to append multi-page TIFFs to an exisitng PDF. The TIFF files are huge.


This is not possible. ImageEn can only write PDF (actually "export" PDF). ImageEn cannot read PDF. For the same reason it is not possible to "Append" to PDF.

quote:
I need to convert the multi-page TIFFs to a multi-page JPeg. Is that possible? I'm new to imaging.


Does not exist a multipage-jpeg (at least with jpeg file name extension). You can extract each page to multiple jpeg files.
There are two main ways. One uses TImageEnMView:
ImageEnMView.MIO.LoadFromFile('multipage.tiff');
for i:=0 to ImageEnMView.ImageCount-1 do
  ImageEnMView.GetImageToFile(i, Format('%d.jpg', [i]));


Another way uses TImageEnView:
imageCount := IEGetFileFramesCount('multipage.tiff');
for i:=0 to imageCount-1 do
begin
  ImageEnView.IO.Params.ImageIndex := i;
  ImageEnView.IO.LoadFromFile('multipage.tiff');
  ImageEnView.IO.SaveToFile(Format('%d.jpg', [i]));
end;

It is also possible to avoid to use visible components (using only TImageEnIO and TIEBitmap).
Go to Top of Page

Agent86

USA
3 Posts

Posted - Aug 31 2011 :  08:13:41  Show Profile  Reply
[Error] InterfaceTasksForm.pas(2063): Undeclared identifier: 'IEGetFileFramesCount'

My code...

procedure TTasksForm.ConvertTIFFToJPeg ;
var imagecount : integer ;

begin
imageCount := IEGetFileFramesCount('C:\InterfaceTasksProgram\AttachmentsQueue\multipage.tif');
for i:=0 to imageCount-1 do
begin
ConvertImageEnView.IO.Params.ImageIndex := i;
ConvertImageEnView.IO.LoadFromFile('C:\InterfaceTasksProgram\AttachmentsQueue\multipage.tif');
ConvertImageEnView.IO.SaveToFile(Format('%d.jpg', [i]));
end;


end;
Go to Top of Page

fab

1310 Posts

Posted - Aug 31 2011 :  08:27:18  Show Profile  Reply
IEGetFileFramesCount is defined in "imageenio" unit, so you have to add it in "uses" statement.
Go to Top of Page

Agent86

USA
3 Posts

Posted - Aug 31 2011 :  08:37:48  Show Profile  Reply
Thank you for the prompt support!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: