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
 Convert multi-page TIFF to multi-page JPeg

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
Agent86 Posted - Aug 30 2011 : 19:06:17
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
4   L A T E S T    R E P L I E S    (Newest First)
Agent86 Posted - Aug 31 2011 : 08:37:48
Thank you for the prompt support!
fab Posted - Aug 31 2011 : 08:27:18
IEGetFileFramesCount is defined in "imageenio" unit, so you have to add it in "uses" statement.
Agent86 Posted - Aug 31 2011 : 08:13:41
[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;
fab Posted - Aug 30 2011 : 22:28:33
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).