Mercurial > hg > digilib
changeset 1443:e321607eb36e new_scaling
update lost license header and README.md.
author | robcast |
---|---|
date | Tue, 10 Nov 2015 16:15:52 +0100 |
parents | 270ffb3284a0 |
children | 02df383e0a85 |
files | README.md common/src/main/java/digilib/image/ImageJobDescription.java |
diffstat | 2 files changed, 35 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/README.md Tue Nov 10 15:42:35 2015 +0100 +++ b/README.md Tue Nov 10 16:15:52 2015 +0100 @@ -18,6 +18,8 @@ * `digilib` facilitates cooperation of scholars over the internet and novel uses of source material by image annotations and stable references that can be embedded in URLs. +* `digilib` facilitates federation of image servers through a standards compliant + [IIIF](http://iiif.io) image API. * `digilib` is Open Source Software under the Lesser General Public License, jointly developed by the [Max-Planck-Institute for the History of Science](http://www.mpiwg-berlin.mpg.de),
--- a/common/src/main/java/digilib/image/ImageJobDescription.java Tue Nov 10 15:42:35 2015 +0100 +++ b/common/src/main/java/digilib/image/ImageJobDescription.java Tue Nov 10 16:15:52 2015 +0100 @@ -1,5 +1,31 @@ package digilib.image; +/* + * #%L + * A class for storing the set of parameters necessary for scaling images with an ImageWorker. + * + * Digital Image Library servlet components + * + * %% + * Copyright (C) 2002 - 2015 MPIWG Berlin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + * Author: Robert Casties (robcast@berlios.de) + */ + import java.awt.geom.Rectangle2D; import java.io.IOException; @@ -203,7 +229,9 @@ */ if (isScaleToFit()) { /* - * scale to fit -- scaling factor based on destination size and user area + * scale to fit -- scale factor based on destination size dw/dh and user area + * + * uses a uniform scale factor for x and y */ scaleX = getDw() / (double) areaWidth; scaleY = getDh() / (double) areaHeight; @@ -234,7 +262,9 @@ } else if (isSqueezeToFit()) { /* - * squeeze to fit -- scaling factor based on destination size and user area + * squeeze to fit -- scale factor based on destination size and user area + * + * uses separate scale factors for x and y */ scaleX = getDw() / (double) areaWidth; scaleY = getDh() / (double) areaHeight; @@ -291,7 +321,7 @@ } } /* - * correct scaling factor if we use a pre-scaled image + * correct absolute scale factor if we use a pre-scaled image */ hiresSize = getHiresSize(); if (imgSize.getWidth() != hiresSize.getWidth()) {