This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 212104

Summary: Scene2Image#createImage does not honor quality setting
Product: platform Reporter: michael.riedel
Component: GraphAssignee: issues@platform <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.1.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description michael.riedel 2012-05-04 19:09:21 UTC
The class Scene2Image method createImage() takes an int parameter named 'quality' that controls the quality of JPEG images. Setting this parameter to values
other than 100 results in minimum quality (0) JPEGs.
The reason for this lies in line 390 of, 
where the ratio is calculated using ints (instead of e.g. float):

390   iwp.setCompressionQuality(quality / 100); 

replacing this line with  

390   iwp.setCompressionQuality(quality / 100.f);

results in the desired behaviour.