VB.NET A generic error occurred in GDI+ when Bitmap.Save()
<p>I'm now created an application that encode value into QR code, and turn into image. Then, I want to store the image to my local. But, I tried many solutions that I found on Google and here. The issue still prompt out unexpectedly everytime. My code and a sample error picture is shown below. Please help me!
<a href="http://i.stack.imgur.com/fXNgI.png" rel="nofollow">A generic error occured in GDI+</a></p>

<pre><code>    Dim qrCodeObject As QRCodeEncoder = New QRCodeEncoder()
    Dim image As Image
    Dim bitmap As Bitmap

    qrCodeObject.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE
    qrCodeObject.QRCodeScale = 6
    qrCodeObject.QRCodeVersion = 5
    qrCodeObject.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.H

    image = qrCodeObject.Encode(value)
    bitmap = New Bitmap(image)
    bitmap.Save(value + ".jpg")
</code></pre>

<p>ANSWER: Always save file with different name and doesn't include any illegal characters</p>