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 - Scene2Image#createImage does not honor quality setting
Summary: Scene2Image#createImage does not honor quality setting
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Graph (show other bugs)
Version: 7.1.1
Hardware: All All
: P3 normal (vote)
Assignee: issues@platform
Depends on:
Reported: 2012-05-04 19:09 UTC by michael.riedel
Modified: 2012-05-04 19:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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.