You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by he...@apache.org on 2010/02/06 20:17:06 UTC
svn commit: r907280 - in /xmlgraphics/batik/trunk: CHANGES
sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java
sources/org/apache/batik/apps/svgbrowser/PNGOptionPanel.java
Author: helder
Date: Sat Feb 6 19:17:03 2010
New Revision: 907280
URL: http://svn.apache.org/viewvc?rev=907280&view=rev
Log:
Bug fix:
PNG export: indexed option doesn't work
(feature initially contributed by: Jun Inamori <ju...@oop-reserch.com>);
(fix contributed by: x00000000@freenet.de);
(closes bug 43847).
General:
Few whitespace fixes.
Modified:
xmlgraphics/batik/trunk/CHANGES
xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java
xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/PNGOptionPanel.java
Modified: xmlgraphics/batik/trunk/CHANGES
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/CHANGES?rev=907280&r1=907279&r2=907280&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/CHANGES (original)
+++ xmlgraphics/batik/trunk/CHANGES Sat Feb 6 19:17:03 2010
@@ -9,9 +9,9 @@
1. Bugzilla problem reports fixed:
- 43411, 44553, 44590, 44919, 44936, 44966, 45112, 45114, 45117,
- 45397, 45520, 45883, 45958, 46072, 46124, 46430, 46431, 46855,
- 46871, 47201, 47202, 48411
+ 43411, 43847, 44553, 44590, 44919, 44936, 44966, 45112, 45114,
+ 45117, 45397, 45520, 45883, 45958, 46072, 46124, 46430, 46431,
+ 46855, 46871, 47201, 47202, 48411
2. New features
@@ -55,6 +55,7 @@
* JavaScript fragments using different types within the one document
(such as text/javascript and application/ecmascript) now share the
same script interpreter.
+ * Exporting 256 color indexed PNG files in Squiggle now works.
1.7beta1 -> 1.7
---------------
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java?rev=907280&r1=907279&r2=907280&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java Sat Feb 6 19:17:03 2010
@@ -1764,10 +1764,7 @@
int choice = fileChooser.showSaveDialog(JSVGViewerFrame.this);
if (choice == JFileChooser.APPROVE_OPTION) {
-
- // Start: By Jun Inamori (jun@oop-reserch.com)
- boolean isIndexed = PNGOptionPanel.showDialog(JSVGViewerFrame.this);
- // End: By Jun Inamori (jun@oop-reserch.com)
+ boolean isIndexed = PNGOptionPanel.showDialog(JSVGViewerFrame.this);
final File f = fileChooser.getSelectedFile();
BufferedImage buffer = svgCanvas.getOffScreen();
@@ -1787,11 +1784,9 @@
trans.addTranscodingHint(PNGTranscoder.KEY_FORCE_TRANSPARENT_WHITE,
Boolean.TRUE );
- // Start: By Jun Inamori
- if(isIndexed){
- trans.addTranscodingHint(PNGTranscoder.KEY_INDEXED,new Integer(256));
- }
- // End: By Jun Inamori
+ if(isIndexed){
+ trans.addTranscodingHint(PNGTranscoder.KEY_INDEXED, new Integer(8));
+ }
final BufferedImage img = trans.createImage(w, h);
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/PNGOptionPanel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/PNGOptionPanel.java?rev=907280&r1=907279&r2=907280&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/PNGOptionPanel.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/PNGOptionPanel.java Sat Feb 6 19:17:03 2010
@@ -51,9 +51,7 @@
ExtendedGridBagConstraints constraints =
new ExtendedGridBagConstraints();
-
constraints.insets = new Insets(5, 5, 5, 5);
-
constraints.weightx = 0;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.NONE;
@@ -61,7 +59,7 @@
add(new JLabel(resources.getString("PNGOptionPanel.label")),
constraints);
- check=new JCheckBox();
+ check = new JCheckBox();
constraints.weightx = 1.0;
constraints.fill = GridBagConstraints.HORIZONTAL;