C# example of JPEG_GRAY

  • Dear Sir.

    Do you have C# example of JPEG_GRAY.

    Now, we can work c++ example with LineScan and mE5marathonVCL.

    If we want work on C# , do you have any suggestion.

    (like:Use C++ to compiler DLL for C# to call in order to speed for "generate JPEG header store jpeg file on disc")


    Thank you so much.



  • Hello Oliver

    with the new JPEG operator released in VA 3.2.0 (See New high speed JPEG operator and examples (VA 3.2.0)) you don't need to generate the header anymore. So there are no specific JPEG functions required in the SDK sample. Simply grab the data and write to a file with extension .jpg. If you want to decode the image of course you will need a decoder. You can use any you like such as JpegBitmapDecoder coming with Microsoft C#.

    See C# wrapper documentation.

    Let me know if this'll help you


    Johannes Trein
    Group Leader R&D
    frame grabber

    Basler AG

  • I've made the C# example for new JPEG operator for Oliver, he has tested it and could go forward with his project. I'm attaching it here maybe it would be helpful for someone others.

    In the Zip file the .hap, .mcf and generated JEPG image are included, the example is running with internal generator so that you don't need a camera, it's compatible with Runtime 5.7.0 x64.