# HG changeset patch # User robcast # Date 1307548141 -7200 # Node ID cbfc94584d3b0d1e1363ce1a9fc7ea98815ef964 # Parent 0cea7e60808053ac6939a153c27f2e6f6a0e1185 reset imgSize in operations that change size. diff -r 0cea7e608080 -r cbfc94584d3b common/src/main/java/digilib/image/ImageLoaderDocuImage.java --- a/common/src/main/java/digilib/image/ImageLoaderDocuImage.java Tue May 24 13:48:37 2011 -0400 +++ b/common/src/main/java/digilib/image/ImageLoaderDocuImage.java Wed Jun 08 17:49:01 2011 +0200 @@ -329,6 +329,8 @@ logger.debug("loading.."); img = reader.read(0, readParam); logger.debug("loaded"); + // invalidate image size + imageSize = null; /* downconversion of highcolor images seems not to work if (img.getColorModel().getComponentSize(0) > 8) { logger.debug("converting to 8bit"); @@ -414,6 +416,8 @@ img = scaleOp.filter(img, null); logger.debug("scaled to " + img.getWidth() + "x" + img.getHeight() + " img=" + img); + // invalidate image size + imageSize = null; } public void blur(int radius) throws ImageOpException { @@ -454,6 +458,8 @@ img = img.getSubimage(x_off, y_off, width, height); logger.debug("CROP:" + img.getWidth() + "x" + img.getHeight()); + // invalidate image size + imageSize = null; } public void rotate(double angle) throws ImageOpException { @@ -480,6 +486,8 @@ // transform image img = rotOp.filter(img, null); logger.debug("rotated: "+img); + // invalidate image size + imageSize = null; } public void mirror(double angle) throws ImageOpException { @@ -511,6 +519,8 @@ AffineTransformOp mirOp = new AffineTransformOp(new AffineTransform(mx, 0, 0, my, tx, ty), renderHint); img = mirOp.filter(img, null); + // invalidate image size + imageSize = null; } public void enhance(float mult, float add) throws ImageOpException {