We can't reliably make the decision as to how to load the image (FastImageIO/raw v normal) at the ResourceManager level - the path name by this point may be a file in the cache which will have lost its indicative extension. Instead, make the decision before we turn the resource path into an actual file name. This fixes YPP's current image loading issues.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@318 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -277,7 +277,7 @@ public class BundledComponentRepository
|
||||
// from interface ImageDataProvider
|
||||
public BufferedImage loadImage (String path) throws IOException
|
||||
{
|
||||
return _bundle.getImageResource(path);
|
||||
return _bundle.getImageResource(path, true);
|
||||
}
|
||||
|
||||
// from interface FrameProvider
|
||||
@@ -357,7 +357,7 @@ public class BundledComponentRepository
|
||||
BufferedImage src = _imgr.getImage(getImageKey(path), zations);
|
||||
float percentageOfDataBuffer = 1;
|
||||
if (bounds != null) {
|
||||
percentageOfDataBuffer =
|
||||
percentageOfDataBuffer =
|
||||
(bounds.height * bounds.width) / (float)(src.getHeight() * src.getWidth());
|
||||
src = src.getSubimage(bounds.x, bounds.y, bounds.width, bounds.height);
|
||||
}
|
||||
@@ -485,7 +485,7 @@ public class BundledComponentRepository
|
||||
{
|
||||
return _set.getTile(getTileIndex(orient, index));
|
||||
}
|
||||
|
||||
|
||||
public Mirage getTileMirage(int orient, int index) {
|
||||
return _set.getTileMirage(getTileIndex(orient, index));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user