Package magick

Examples of magick.MagickImage.writeImage()


            //  java.lang.Runtime.getRuntime().runFinalization();

      ImageInfo info = new ImageInfo(args[0]);
      MagickImage image = new MagickImage(info);
      image.setFileName("copy_" + args[0]);
      image.writeImage(info);
            MagickImage thumb = image.scaleImage(10, 10);
      Thread.sleep(1000);

            // Force finalization and garbage collection.
            System.runFinalization();
View Full Code Here


            System.out.println("Depth is "+image.getDepth());
            System.out.println("Matte is "+image.getMatte());
            image.setMatte(false);
            image.signatureImage();
            image.setFileName("copy.jpg");
            image.writeImage(info);

            // Background Color
            System.out.println("Old colour " + image.getBackgroundColor());
            image.setBackgroundColor(PixelPacket.queryColorDatabase("red"));
            System.out.println("New colour " + image.getBackgroundColor());
View Full Code Here

            // Border image
            image.setBorderColor(PixelPacket.queryColorDatabase("green"));
            MagickImage borderedImage = image.borderImage(new Rectangle(0, 0,
                    10, 20));
            borderedImage.setFileName("border.jpg");
            borderedImage.writeImage(info);

            // Raise image
            MagickImage raisedImage = new MagickImage(new ImageInfo("pics.jpg"));
            raisedImage.raiseImage(new Rectangle(0, 0, 10, 20), true);
            raisedImage.setFileName("raised.jpg");
View Full Code Here

            // Raise image
            MagickImage raisedImage = new MagickImage(new ImageInfo("pics.jpg"));
            raisedImage.raiseImage(new Rectangle(0, 0, 10, 20), true);
            raisedImage.setFileName("raised.jpg");
            raisedImage.writeImage(info);

            // Profile test
            System.out.println("Number of generic profiles "
                    + image.getGenericProfileCount());
            displayProfile(image.getColorProfile());
View Full Code Here

            MontageInfo montageInfo = new MontageInfo(new ImageInfo());
            montageInfo.setFileName("montage.jpg");
            montageInfo.setTitle("Melbourne");
            montageInfo.setBorderWidth(5);
            MagickImage montage = seqImage.montageImages(montageInfo);
            montage.writeImage(new ImageInfo());

            // Converting the montage into a blob
            montage.setMagick("JPG");
            byte[] mblob = montage.imageToBlob(new ImageInfo());
            System.out.println("Length "+mblob.length);
View Full Code Here

            System.out.println("Length "+mblob.length);

            // Test average
            MagickImage average = seqImage.averageImages();
            average.setFileName("average.jpg");
            average.writeImage(new ImageInfo());

            // Image to blob
            info = new ImageInfo();
            byte[] blob = image.imageToBlob(info);
View Full Code Here

            Dimension imageDim = blobImage.getDimension();
            System.out.println("Blob width is " + imageDim.width);
            System.out.println("Blob heght is " + imageDim.height);
            System.out.println(imageDim);
            blobImage.setFileName("blob.jpg");
            blobImage.writeImage(info);

            // JPEG Image to GIF blob
            image.setMagick("GIF");
            blob = image.imageToBlob(info);
            try {
View Full Code Here

            // Rotation and shear
            image = new MagickImage(new ImageInfo("pics.jpg"));
            MagickImage rotated = image.rotateImage(45.0);
            rotated.setFileName("rotated.jpg");
            rotated.writeImage(info);
            MagickImage sheared = image.shearImage(50.0, 10.0);
            sheared.setFileName("sheared.jpg");
            sheared.writeImage(info);
            MagickImage scaled = image.scaleImage(100, 80);
            scaled.setFileName("scaled.jpg");
View Full Code Here

            MagickImage rotated = image.rotateImage(45.0);
            rotated.setFileName("rotated.jpg");
            rotated.writeImage(info);
            MagickImage sheared = image.shearImage(50.0, 10.0);
            sheared.setFileName("sheared.jpg");
            sheared.writeImage(info);
            MagickImage scaled = image.scaleImage(100, 80);
            scaled.setFileName("scaled.jpg");
            scaled.writeImage(info);

            // Cloning
View Full Code Here

            MagickImage sheared = image.shearImage(50.0, 10.0);
            sheared.setFileName("sheared.jpg");
            sheared.writeImage(info);
            MagickImage scaled = image.scaleImage(100, 80);
            scaled.setFileName("scaled.jpg");
            scaled.writeImage(info);

            // Cloning
            imageDim = image.getDimension();
            System.out.println("Width is " + imageDim.width);
            System.out.println("Height is " + imageDim.height);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.