[Mono-bugs] [Bug 689900] New: Save JPEG image with quality factor does not work - quality ignored
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Apr 26 08:37:48 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=689900
https://bugzilla.novell.com/show_bug.cgi?id=689900#c0
Summary: Save JPEG image with quality factor does not work -
quality ignored
Classification: Mono
Product: Mono: Class Libraries
Version: 2.8.x
Platform: Macintosh
OS/Version: Mac OS X 10.6
Status: NEW
Severity: Normal
Priority: P5 - None
Component: libgdiplus
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: mark at firstfocus.nl
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1)
Gecko/20100101 Firefox/4.0.1
Saving a JPEG image with a given quality factor does not work. The save works
fine but the quality factor is ignored. It seems as if this particular encoder
parameter is not supported (ignored) in Mono.
Test code as follows:
ImageCodecInfo[] encoders = ImageCodecInfo.GetImageEncoders();
foreach (ImageCodecInfo encoder in encoders)
if (encoder.MimeType == "image/jpeg")
break;
EncoderParameters pars = new EncoderParameters();
pars.Param[0] = new EncoderParameter(Encoder.Quality, 10);
image.Save(cachedFile, encoder, pars);
. where "image" is a Bitmap object with a valid image.
The above code works but produces the same image, regardless of the quality
factor.
Reproducible: Always
Steps to Reproduce:
1. Load Bitmap instance with valid image
2. Run code mentioned in details section
3. Examine output - quality factor ignored
Actual Results:
Image is saved correctly but seems to ignore quality factor. Setting different
qualities keeps producing the same image.
Expected Results:
image.Save() should produce JPEG files with different jpg quality factors.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list