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
 Inserting an empty white image

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
lorife Posted - Jan 12 2026 : 04:02:57
Hello,
I have a file (which can be a PDF or a TIF). I need to open it, add an empty white page in a specific position (at the moment is at the end) and then save it.
I tried this:

iemv_OUT.Clear;
iemv_OUT.MIO.LoadFromFile(FullPathIN);
iemv_OUT.InsertImage(0);
iemv_OUT.MIO.SaveToFile(FullPathOUT, 0, False);

but aborting returns true and saves an empty file.

Could you please help me?
thank you
5   L A T E S T    R E P L I E S    (Newest First)
lorife Posted - Jan 16 2026 : 04:09:46
Ok it works great, thank you very much!
xequte Posted - Jan 16 2026 : 00:04:01
Or in the coming February release, you can just use:

      iemv_OUT.Clear();
      iemv_OUT.MIO.LoadFromFile(FullPathIN);

      if posIn >= 9998 then
        posIn := iemv_OUT.ImageCount;

      var x := (if posIn > 0 then posIn - 1 else posIn + 1);

      ww := iemv_OUT.ImageWidth[ x ];
      hh := iemv_OUT.ImageWidth[ x ];
      iemv_OUT.InsertImage( posIn, ww, hh, ie24RGB, clWhite );


Nigel
Xequte Software
www.imageen.com
xequte Posted - Jan 16 2026 : 00:02:38
Thanks, I've received your code. If I'm understanding it correctly, the better method is:

      iemv_OUT.Clear();
      iemv_OUT.MIO.LoadFromFile(FullPathIN);

      if posIn >= 9998 then
        posIn := iemv_OUT.ImageCount;

      var x := (if posIn > 0 then posIn - 1 else posIn + 1);

      ww := iemv_OUT.ImageWidth[ x ];
      hh := iemv_OUT.ImageWidth[ x ];
      bmp := TIEBitmap.Create( ww, hh, clWhite );
      iemv_OUT.InsertImage( posIn, bmp );
      bmp.Free();


Nigel
Xequte Software
www.imageen.com
lorife Posted - Jan 15 2026 : 02:36:03
Hello,
I sent the tiff file in the email because it contains some personal data.
Thanks.
xequte Posted - Jan 12 2026 : 15:59:12
Hi

This works fine when I test it here with a multipage TIFF file (let's resolve TIFFs first, as PDF documents work differently than images).

Does the TIFF content look correct in the TImageEnMView? Maybe also post or forward us your test TIFF file.



Nigel
Xequte Software
www.imageen.com