Last post May 23, 2018 06:46 AM by Nan Yu
May 22, 2018 05:22 PM|dlchase|LINK
We use the code below to stream an image to a reduced size jpg file and our customer was wondering if there is a way to remove the images metadata (date/time taken, etc.) when we import. Thanks.
Dim filePath As String = strFolderPath & "\" & strFileName
If File.Exists(filePath) = False Then
'If Image is less that 800KB then move it
'otherwise stream it to a smaller file.
If fi.Length < 800000 Then
Dim bmpImg As Bitmap = Nothing
Using fileStream As FileStream = File.OpenRead(strFilePath)
Dim memStream As New MemoryStream()
fileStream.Read(memStream.GetBuffer(), 0, CInt(fileStream.Length))
bmpImg = FilesClass.Resize_Image(fileStream, 2533, 1900)
May 22, 2018 08:55 PM|oned_gk|LINK
Maybe you can create new bitmap
May 22, 2018 09:21 PM|dlchase|LINK
Not clear on how that would be done. Can you give example?
May 23, 2018 01:24 AM|oned_gk|LINK
May 23, 2018 06:46 AM|Nan Yu|LINK
Hi dlchase ,
You can refer to similar discussion : simple way to remove EXIF data from a JPEG with .NET . For JPEG file to remove the Exif , you can refer to
try with below code sample: