Put barcode on image

2 posts, 0 answers
  1. Louisa
    Louisa avatar
    2 posts
    Member since:
    Mar 2015

    Posted 20 Dec 2015 Link to this post

    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.
  2. Martin
    Martin avatar
    1046 posts

    Posted 23 Dec 2015 Link to this post

    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.

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top