This is a migrated thread and some comments may be shown as answers.

Put barcode on image

1 Answer 165 Views
BarCode
This is a migrated thread and some comments may be shown as answers.
Louisa
Top achievements
Rank 1
Louisa asked on 20 Dec 2015, 03:07 PM
I would like to attach a Code128 barcode on the corner of a existing image ( jpeg, png, tiff) programmatically, and then print it out through program. But so far as I go through the telerik document and demo, I couldn't find a proper way to put the barcode on the image. Is there any way to do so ? I would really appreciate if anyone would give me any suggestion.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 23 Dec 2015, 04:21 PM
Hello Louisa,

You can export the barcode to an image and try to add it in a drawing context along with the original image. Then render the context and save it to a file. Note that the UIElement which will be exported should be measured and arranged before the export. Otherwise, an exception will be thrown. Also, keep in mind that the bitmap doesn't support alpha (transparency) and depending on the approach used for the export the transparent Background of the barcode could be change to black. This is why I recommend setting a Background to the barcode before exporting it.

I hope this information is useful.

Regards,
Martin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
BarCode
Asked by
Louisa
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or