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 2 1002
Check this out http://weblogs.asp.net/despos/archiv.../12/57752.aspx
George
"darrel" <no*****@nowhere.com> wrote in message
news:O3**************@TK2MSFTNGP15.phx.gbl... 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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Michael Kennedy [UB] |
last post by:
Hi Everyone,
I have this multithreaded C# windows forms application which does a lot of
image processing. Occasionally, I get the following error:
A generic error occurred in GDI+....
|
by: dale zhang |
last post by:
Hi,
I am trying to save and read an image from MS Access DB based on the
following article:
http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp
Right now, I saved images without any...
|
by: IkBenHet |
last post by:
Hello,
I use this script to upload image files to a folder on a IIS6 server:
******************* START UPLOAD.ASPX FILE **********************
<%@ Page Language="VB" Debug="true" %>
|
by: Mark Denardo |
last post by:
Hi, I need some expert GDI+ person to help me with my RoundOffImage
Function:
What I'm trying to do is take in an image, crop off the edges around an
ellipse region I set up, and then return the...
|
by: ljuljacka |
last post by:
I'm trying to display resized images. Locations of images are fetched from
database. The problem is that with the following code, I get only the first
image displayed:
<?php...
|
by: Hexman |
last post by:
Hello All,
I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm
using some VB6 code, .Net2003 code,...
|
by: crazyyellowguy |
last post by:
hi,
This is my first post in this forum and I just wanted to thank you for even taking a look at my post. The class that I am writing the C code for is my first computer class and my knowledge is...
|
by: bharathv6 |
last post by:
i need to do is modify the image in memory like resizing the image in memory etc ... with out saving it disk as i have to return back the image with out saving it disk
PIL supports the use of...
|
by: JJ |
last post by:
Whilst I am resizing images I am losing quality. This is only happening in
small amounts, but if you repeatedly put the same image through the
following code, the image quality slowly degrades. Can...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |