Package org.photovault.dcraw

Examples of org.photovault.dcraw.RawImage


     @param f The raw file to read
     @return <code>true</code> if meta data was succesfully read, <code>false</code>
     otherwise (e.g. if f was not a raw image file.
     */
    private boolean updateFromRawFileMetadata( File f ) {
        RawImage ri;
        try {
            ri = new RawImage(f);
        } catch (PhotovaultException ex) {
            return false;
        }
        if ( !ri.isValidRawFile() ) {
            return false;
        }
        setShootTime( ri.getTimestamp() );
        setFStop( ri.getAperture() );
        setShutterSpeed( ri.getShutterSpeed() );
        setFilmSpeed( ri.getFilmSpeed() );
        String camera = ri.getCamera();
        if ( camera.length() > CAMERA_LENGTH ) {
            camera = camera.substring( 0, CAMERA_LENGTH );
        }
        setCamera( camera );
        setFilm( "Digital" );
        setFocalLength( ri.getFocalLength() );
       
        ri.autoExpose();
        setRawSettings( ri.getRawSettings() );
        return true;
    }
View Full Code Here


            PhotovaultImage img = imgFactory.create( imageFile, false, false );
            if ( channelMap != null ) {
                img.setColorAdjustment( channelMap );
            }
            if ( img instanceof RawImage ) {
                RawImage ri = (RawImage) img;
                ri.setRawSettings( rawSettings );
            }
            if ( createPreview ) {
                // Calculate preview image size
                int previewWidth = img.getWidth();
                int previewHeight = img.getHeight();
View Full Code Here

            img.setRotation( prefRotation - original.getRotated() );
            if ( channelMap != null ) {
                img.setColorAdjustment( channelMap );
            }
            if ( img instanceof RawImage ) {
                RawImage ri = (RawImage) img;
                if ( rawSettings != null ) {
                    ri.setRawSettings( rawSettings );
                } else if ( rawSettings == null ) {
                    // No raw settings for this photo yet, let's use
                    // the thumbnail settings
                    rawSettings = ri.getRawSettings();
                    txw.lock( rawSettings, Transaction.WRITE );
                }
            }
            if ( width > 0 ) {
                exportImage =img.getRenderedImage( width, height, false );
View Full Code Here

                        log.warn( "Cannot close image stream: " + ex.getMessage() );
                    }
                }
            }
        } else {
            RawImage ri = new RawImage( imageFile );
            if ( ri.isValidRawFile() ) {
                // PlanarImage img = ri.getCorrectedImage();
                width = ri.getWidth();
                height = ri.getHeight();
            } else {
                throw new PhotovaultException( "Unknown image file extension " + suffix +
                        "\nwhile reading " + imageFile.getAbsolutePath() );
            }
        }
View Full Code Here

     */
    public PhotovaultImage create( File f, boolean loadImage, boolean loadMetadata )
            throws PhotovaultException {
        PhotovaultImage ret = ImageIOImage.getImage( f, loadImage, loadMetadata );
        if ( ret == null ) {
            RawImage raw = new RawImage( f );
            if ( raw.isValidRawFile() ) {
                ret = raw;
            }
        }
        return ret;       
    }
View Full Code Here

TOP

Related Classes of org.photovault.dcraw.RawImage

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.