Colorizer is now smart enough to handle xml files instead of just the pre-parsed dat files.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3887 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -65,6 +65,7 @@ import com.samskivert.util.Interator;
|
|||||||
import com.threerings.media.image.ColorPository;
|
import com.threerings.media.image.ColorPository;
|
||||||
import com.threerings.media.image.Colorization;
|
import com.threerings.media.image.Colorization;
|
||||||
import com.threerings.media.image.ImageUtil;
|
import com.threerings.media.image.ImageUtil;
|
||||||
|
import com.threerings.media.image.tools.xml.ColorPositoryParser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the image recoloring code.
|
* Tests the image recoloring code.
|
||||||
@@ -320,8 +321,14 @@ public class RecolorImage extends JPanel
|
|||||||
public void setColorizeFile (File path)
|
public void setColorizeFile (File path)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
_colRepo =
|
if (path.getName().endsWith("xml")) {
|
||||||
ColorPository.loadColorPository(new FileInputStream(path));
|
ColorPositoryParser parser = new ColorPositoryParser();
|
||||||
|
_colRepo =
|
||||||
|
(ColorPository)(parser.parseConfig(path));
|
||||||
|
} else {
|
||||||
|
_colRepo =
|
||||||
|
ColorPository.loadColorPository(new FileInputStream(path));
|
||||||
|
}
|
||||||
|
|
||||||
_classList.removeAllItems();
|
_classList.removeAllItems();
|
||||||
Iterator iter = _colRepo.enumerateClasses();
|
Iterator iter = _colRepo.enumerateClasses();
|
||||||
|
|||||||
Reference in New Issue
Block a user