C1Barcode: Howto save barcode to image file

Posted by: SHanau on 21 August 2019, 9:46 pm EST

  • Posted 21 August 2019, 9:46 pm EST

    Hi,

    Could you please provide some sample code of how to save a barcode created with C1Barcode to an image file ?

    Thanks in advance,
    Stephan
  • Replied 22 August 2019, 4:40 pm EST

    Hello,

    You can use the Image property of C1BarCode which returns bitmap image of the control.
    Code snippet is given below :
    Image img = c1BarCode1.Image;
    string filename = @"..\..\BarCode.bmp";
    img.Save(filename);

    The documentation link of the property is given below :
    https://help.grapecity.com/componentone/NetHelp/c1barcode/webframe.html#C1.Win.BarCode.4~C1.Win.BarCode.C1BarCode~Image.html

    Please go through the attached sample demonstrating the same.
    I hope it helps.

    Thanks and Regards,
    Prabhat Sharma.
    BarCodeToImage.zip
  • Replied 26 August 2019, 2:58 am EST

    Hello,

    Thanks very much for the info. As I am new to this, could you please provide a small sample of how to save a Datamatrix barcode 144x144 to an image of 300 dpi ?

    Thanks in advance,
    Stephan
  • Marked as Answer

    Replied 26 August 2019, 4:13 pm EST

    Hello,

    Here is the sample attached to save the Datamatrix barcode to an image of 300dpi.
    Please have a look.

    If you need any other help, please let us know.

    Regards,
    Prabhat Sharma.
    BarCodeToImage.zip
  • Replied 27 August 2019, 6:32 pm EST

    Hello Prabhat,

    Thanks for the sample and your support. It means a lot.

    Regards,
    Stephan
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels