How to convert camera raw file to jpg file without losing metadata RRS feed

  • Question

  • I'm using following codes that I got from internet searching.


        Public Function memStreamFull(ByVal cFullPath As String)
            Dim bmpDec = BitmapDecoder.Create(New Uri(cFullPath), BitmapCreateOptions.DelayCreation, BitmapCacheOption.None)
            Dim bmpEnc = New JpegBitmapEncoder
            bmpEnc.QualityLevel = 100
            Using ms As New MemoryStream

                bmpDec = Nothing
                bmpEnc = Nothing
                Return Image.FromStream(ms)
            End Using
        End Function

    It works fine.

    But this code has two problems.

    One is lost metadata of raw file.

    The other one is displaying "not enough memory".

    Any one who has solution, please help me.

    Thank you.

    Wednesday, March 22, 2017 12:37 PM

All replies

  • Please refer to this case.

    Friday, March 24, 2017 9:58 AM