Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
yogurtspy
Posted - Apr 03 2014 : 09:13:26 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.
1 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Apr 03 2014 : 16:20:52 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');