Package at.riemers.zero.base.util

Examples of at.riemers.zero.base.util.ImageResizer



        if (image == null) {
            image = imageDao.findById(id);
            if (x != null && y != null) {
                ImageResizer resizer = new ImageResizer();
                Image thumb = new Image();
                thumb.setFileName("th_" + image.getFileName());
                log.debug("resizing image: " + image.getId() + " " + image.getImageBuf().length + " bytes");
                long start = System.currentTimeMillis();
                thumb.setImageBuf(resizer.resize2(image.getImageBuf(), x, y));
                log.debug("... " + (System.currentTimeMillis() - start) / 1000);
                thumb.setResolution("x=" + x + ",y=" + y);
                thumb.setSource(image);
                imageDao.makePersistent(thumb);
                image = thumb;
View Full Code Here



        if (imageInfo == null) {
            imageInfo = imageInfoDao.findById(id);
            if (x != null && y != null) {
                ImageResizer resizer = new ImageResizer();
                ImageMetaInfo thumb = new ImageMetaInfo();
                thumb.setFileName("th_" + imageInfo.getFileName());
                long start = System.currentTimeMillis();
                thumb.setImage(new Image());
                thumb.getImage().setImageBuf(resizer.resize2(imageInfo.getImage().getImageBuf(), x, y));
                log.debug("... " + (System.currentTimeMillis() - start) / 1000);
                thumb.setResolution("x=" + x + ",y=" + y);
                thumb.setSource(imageInfo);
                imageInfoDao.makePersistent(thumb);
                imageInfo = thumb;
View Full Code Here

TOP

Related Classes of at.riemers.zero.base.util.ImageResizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.