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
 Inserting Han Soft 2D Barcode into TIFF
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogurtspy

1 Posts

Posted - Apr 03 2014 :  09:13:26  Show Profile  Reply
Has anyone tried using the Han Soft 2D barcode controls, to insert a 2D barcode into an existing TIFF image? The barcode component links to a TImage control normally to display a barcode, but I need to add the barcode to an existing TIFF, then print this. Is this possible with ImageEn?

The nearest solution I've come up with so far, is using the Han Soft controls to generate a BMP image, then adding this to the TIFF on a new layer, in the required position.

I'm very new to both sets of components (Han Soft and ImageEn), so if there is an easier solution I would be glad to hear it.

Thanks very much.

xequte

38214 Posts

Posted - Apr 03 2014 :  16:20:52  Show Profile  Reply
Hi

If the Han Soft component gives you a bitmap, why not use use TCanvas.CopyRect to draw it onto the TIFF.

E.g.

X, Y: Destination position of the barcode

MyTiffIEBitmap.Read('D:\MyTiff.tiff');
MyTiffIEBitmap.Canvas.CopyRect(
                  Rect(X, Y, X + BarCodeBmp.Width, Y + BarCodeBmp.Height),
                  BarCodeBmp.Canvas,
                  Rect(0, 0, BarCodeBmp.Width, BarCodeBmp.Height));
MyTiffIEBitmap.Write('D:\MyTiffWithBarcode.tiff');


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: