Package com.lightcrafts.image

Examples of com.lightcrafts.image.ImageInfo


            return;
        }
        if ( file.isHidden() || !file.isFile() )
            return;

        final ImageInfo imageInfo = ImageInfo.getInstanceFor( file );
        if ( imageInfo.getImageType() != null )
            m_suite.addTest( new ReadImageTestCase( imageInfo ) );
    }
View Full Code Here


        if ( Platform.getType() == Platform.MacOSX ) {
            System.loadLibrary( "MacOSX" );
        }

        File file = new File(args[0]);
        ImageInfo info = ImageInfo.getInstanceFor(file);
        ImageMetadata meta = info.getMetadata();
        Engine engine = EngineFactory.createEngine(meta, null, null);
        Component comp = engine.getComponent();

        JFrame frame;
View Full Code Here

    private Engine engine;
    private JComponent image;

    EngineCroppedImageRenderer(String path) throws Exception {
        File file = new File(path);
        ImageInfo info = ImageInfo.getInstanceFor(file);
        ImageMetadata meta = info.getMetadata();
        engine = EngineFactory.createEngine(meta, null, null);
        image = (JComponent) engine.getComponent();
        image.setOpaque(false);
    }
View Full Code Here

     */
    public synchronized ImageType getImageType() {
        if ( m_imageType == null ) {
            final File file = getFile();
            if ( file != null ) {
                final ImageInfo info = ImageInfo.getInstanceFor( file );
                try {
                    m_imageType = info.getImageType();
                }
                catch ( IOException e ) {
                    // ignore
                }
                catch ( LightCraftsException e ) {
View Full Code Here

    public static void main( String[] args ) throws Exception {
        final FileOutputStream fos = new FileOutputStream( "/tmp/out" );
        final ObjectOutputStream oos = new ObjectOutputStream( fos );

        final ImageInfo info = ImageInfo.getInstanceFor( new File( args[0] ) );
        ImageMetadata metadata = info.getMetadata();
        metadata.writeExternal( oos );

        oos.close();
        fos.close();
View Full Code Here

                File relativeFile = new File(path);
                if (relativeFile.isFile()) {
                    file = relativeFile;
                }
            }
            ImageInfo info = ImageInfo.getInstanceFor(file);
            try {
                meta = info.getMetadata();
            }
            catch (FileNotFoundException e) {
                throw new MissingImageFileException(file);
            }
        }
View Full Code Here

        // Add thumbnail data for the browser:
        RenderedImage thumb = engine.getRendering(new Dimension(320, 320));
        // divorce the preview from the document
        thumb = new CachedImage((PlanarImage) thumb, JAIContext.fileCache);
        ImageInfo info = ImageInfo.getInstanceFor(file);
        LZNImageType.INSTANCE.putImage(info, thumb);

        // Cache a high resolution preview:
        int size = PreviewUpdater.PreviewSize;
        RenderedImage preview = engine.getRendering(new Dimension(size, size));
View Full Code Here

    /**
     * Tell quickly if the given file has any LZN data in it.
     */
    public static boolean isReadable(File file) {
        ImageInfo info = ImageInfo.getInstanceFor(file);
        try {
            return info.getImageType() instanceof LZNDocumentProvider;
        }
        catch ( Throwable t ) {
            return false;
        }
    }
View Full Code Here

     */
    public static Interpretation read(File file) {
        XmlDocument xmlDoc = null;
        File imageFile = null;

        ImageInfo info = ImageInfo.getInstanceFor(file);
        ImageType type;
        try {
            type = info.getImageType();
        }
        catch (IOException e) {
            return null;
        }
        catch (LightCraftsException e) {
View Full Code Here

        if (args.length != 1) {
            System.err.println("usage: DirectoryStack (file)");
            System.exit(1);
        }
        File file = new File(args[0]);
        ImageInfo info = ImageInfo.getInstanceFor(file);
        ImageMetadata metadata = info.getMetadata();
        DirectoryStack dirs = new DirectoryStack(metadata, true, true, true);

        JScrollPane panel = new JScrollPane(dirs);

        JFrame frame = new JFrame("Test");
View Full Code Here

TOP

Related Classes of com.lightcrafts.image.ImageInfo

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.