D
darrel
I'm currently saving a JPG file as such:
imgOutput.Save("path/filename.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
That saves the imgOutput as a JPG to the path shown.
Works fine.
Now, I'd like to change the JPG compression it uses. I apparently can do
that with an EncoderParameter:
Dim objEncoderParams As New EncoderParameters(1)
objEncoderParams.Param(0) = New EncoderParameter(Encoder.Quality, 500)
imgOutput.Save("path/filename.jpg", *encoder*, objEncoderParams)
What I'm stuck on is the 'encoder' value. What do I put there to? I assume I
need to tell it to use the JPG encoder, right? If so, I'm stuck on the
syntax.
-Darrel
imgOutput.Save("path/filename.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
That saves the imgOutput as a JPG to the path shown.
Works fine.
Now, I'd like to change the JPG compression it uses. I apparently can do
that with an EncoderParameter:
Dim objEncoderParams As New EncoderParameters(1)
objEncoderParams.Param(0) = New EncoderParameter(Encoder.Quality, 500)
imgOutput.Save("path/filename.jpg", *encoder*, objEncoderParams)
What I'm stuck on is the 'encoder' value. What do I put there to? I assume I
need to tell it to use the JPG encoder, right? If so, I'm stuck on the
syntax.
-Darrel