Dim thumb As Thumbnailator
Dim PreviewBytesJpg() As Byte
Dim PreviewBytesPng() As Byte
'This creates a thumbnail of 250px wide, the height is zero which means it will auto calculate based on the aspect of the image
PreviewBytesJpg= thumb.CreateThumbnail(ResultBytes,250,0) 'Returns a JPEG
PreviewBytesPng= thumb.CreateThumbnail2(ResultBytes,250,0) 'Returns a PNG which can be transparent