Speed up saving JPG

I need help figuring out how to speed up RAW to JPG saving time. It typically takes 10-15 seconds to save a JPG for each image. Here's my configuration:
Canon 5d3 large RAW
Panasonic Toughbook, Windows 8.1 Pro, 16GB RAM, 5400 rpm hard drive, shared graphics
I usually save the JPG at 10 quality
I suspect that the slow 5400 rpm hard drive is the culprit and that an SSD would help, but I'm just looking for some input on this

jruud wrote:
both cores ... 60%
Are you saying the cores never max out and clip, or just that the average is about 60%?
Anyway, a 4-8 core processor will generally improve processing time over a dual core, when Lr is properly distributing the load during export.
Until hardware upgrade, my only advice is:
A. Export into a tree for ready access, as soon as you finish editing, so you're not doing 1000 at once and waiting for them.
B. Consider accessing rendered copies from the preview cache instead, e.g. via a plugin like PreviewExporter.
C. Convert to DNG and access embedded previews - granted it takes the same amount of time to render previews as export, still may make things more convenient.
Note: Lightroom takes a while to export big raw files even on the fastest hardware, so don't get your hopes up too high, but 10-15 seconds is on the slow side - you could probably cut that in half fairly easily (by upgrading your hardware), but getting it under a quarter will be more of a feat..
I am assuming minimal amount due to background processes etc. which may be wrong - so check it / test it...
Rob

Similar Messages

  • Saved jpg image has magenta hue in browser - help please

    Hi, folks:
    [running photoshop cs3 under windows XP Pro/SP2]
    I've been saving jpg files for years with no problems. Now I have one that has me stumped!
    I have a psd file with about 14 layers, a few of which are hidden. I merge layers and then save as a high-resolution jpg. I then open up the jpg in photoshop and it looks just fine.
    However, when viewed directly from my pc in a browser (MSIE 7 or Firefox 3.0.3, either stand-alone or in an html shell), the image has a discernable dark magenta hue.
    Originally, I mistakenly had an extra channel in the PSD file that I thought was causing the problem. But it's removed yet the problem remains.
    Note: I also saved as a GIF and PNG and the problem remained.
    I'm really stuck on this one. Help would be appreciated!
    Thanks!
    Fred

    FOUND A SOLUTION - CHANGED ICC COLOR PROFILE
    Well, folks, I've answered my own question. The problem *was* the ICC Color profile, contrary to what tech support told me in the past (and indeed tech support pretty much told me to go take a hike in the past).
    I opened the PSD, then went to file->Edit-> Convert to profile and converted to profile sRGB IEC61966-2.1 and told not to merge layers. Then I saved as a jpg and the image was perfect.
    Lesson learned (no thanks to Adobe Support): when importing video frames, change the ICC Profile!
    Now for the biggest laugh of the day: he said (in case#180459305) that if you copy or rename files using the filesystem filemanager (e.g., the desktop or windows explorer), that it would open the file to copy or rename it and then rewrite it, thus cause lossy image degradation.
    I told him (politely) that he was wrong - that renaming a file does not open it - it simply updates directory information about the file, and that copying a file (outside of photoshop) does a byte-for-byte clone of the file and does not degrade image quality.
    Where do they get these purported "experts"????
    Fred

  • Pshop CC -- saving JPG & PNG file size bloat

    Saving JPGs & PNGs from Photoshop CC is creating what I can only describe as a obscene file bloat.  Just recently, what should have been a 7k jpg saved as a 1.1 mb jpg file.  PNGs which should average roughly 100-150k are coming out at 1.3mb.  If I use the "Save for Web", sometimes it gives me the proper sized images.
    I have noticed this on 2 computers --- one a mac & one windows with completely different file sets.  So it is not an issue of my OS, the original files or anything specific to one particular common item.
    FYI -- Doing the same thing with pshop cs6, I get the proper file sizes. 
    I have included a sample image here.  This image is a straight out "save" from pshop CC  -- it is 1.1mb.  However, when I saved the same image as a JPG in pshop cs6, it was 7k.
    Is anyone else experiencing this issue?

    Haven't had a PNG or JPG go wacky here in that way so far...
    I think the issue is revealed by looking in File - File Info in the Raw Data section.  I don't know why, but there are a huge number of <rdf:li> XML elements showing up there with hex values in them.  I don't know what that means, exactly, but I believe the accumulation of that metadata explains the size increase.
    Do any of the terms you see in the raw metadata mean anything to you?  Do you have 3rd party plug-ins that could be responsible for this?
    -Noel

  • Saving JPG to PNG using Save for the Web

    Morning
    I came across Paul Riggott's script for saving PSD to PNG which I changed to JPG to PSD.
    The only problem with this is that the file size in most cases is larger than the original.
    Is there a way to do a save as for the web as well?
    Here is the  original code:
    #target photoshop
    var imageFolder = Folder.selectDialog("Select top folder to process");
    var folderList=[];
    if (imageFolder != null)  {
    processFolder(imageFolder);
    folderList.unshift(imageFolder);
    createPNGfromJPG(folderList);
    function createPNGfromJPG(folderList){
    for(var a in folderList){
      var fileList = folderList[a].getFiles ("*.jpg");
       for (var z in fileList){
        var file = fileList[z];
        open(file);
        var Name = fileList[z].name.replace(/\.[^\.]+$/, '');
        var saveFile = File(decodeURI(fileList[z].path+"/"+Name+".png"));
        SavePNG(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    function processFolder(folder) {
        var fileList = folder.getFiles()
         for (var i = 0; i < fileList.length; i++) {
            var file = fileList[i];
    if (file instanceof Folder) {
      folderList.push(file); 
           processFolder(file);
    function SavePNG(saveFile){
        pngSaveOptions = new PNGSaveOptions();
        pngSaveOptions.embedColorProfile = true;
        pngSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
        pngSaveOptions.matte = MatteType.NONE;
        pngSaveOptions.quality = 1;
    pngSaveOptions.PNG8 = false;
        pngSaveOptions.transparency = true;
    activeDocument.saveAs(saveFile, pngSaveOptions, true, Extension.LOWERCASE);
    Any help or support to head me in the right direction would be appreciated.
    Iain

    This uses "Fitimage"....
    #target photoshop
    var imageFolder = Folder.selectDialog("Select top folder to process");
    var folderList=[];
    if (imageFolder != null)  {
    processFolder(imageFolder);
    folderList.unshift(imageFolder);
    createPNGfromJPG(folderList);
    function createPNGfromJPG(folderList){
    for(var a in folderList){
      var fileList = folderList[a].getFiles ("*.jpg");
       for (var z in fileList){
        var file = fileList[z];
        open(file);
        var Name = fileList[z].name.replace(/\.[^\.]+$/, '');
        var saveFile = File(decodeURI(fileList[z].path+"/"+Name+".png"));
        FitImage(640,640); //Resizes  to the longest size
        //FitImage(128,128);
        savePNG8SFW(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    function processFolder(folder) {
        var fileList = folder.getFiles()
         for (var i = 0; i < fileList.length; i++) {
            var file = fileList[i];
    if (file instanceof Folder) {
      folderList.push(file); 
           processFolder(file);
    function savePNG8SFW(saveFile) {
        var desc8 = new ActionDescriptor();
            var desc9 = new ActionDescriptor();
            desc9.putEnumerated( charIDToTypeID('Op  '), charIDToTypeID('SWOp'), charIDToTypeID('OpSa') );
            desc9.putEnumerated( charIDToTypeID('Fmt '), charIDToTypeID('IRFm'), charIDToTypeID('PNG8') );
            desc9.putBoolean( charIDToTypeID('Intr'), false );
            desc9.putEnumerated( charIDToTypeID('RedA'), charIDToTypeID('IRRd'), charIDToTypeID('Sltv') );
            desc9.putBoolean( charIDToTypeID('RChT'), false );
            desc9.putBoolean( charIDToTypeID('RChV'), false );
            desc9.putBoolean( charIDToTypeID('AuRd'), false );
            desc9.putInteger( charIDToTypeID('NCol'), 256 ); //Number of colours.
            desc9.putEnumerated( charIDToTypeID('Dthr'), charIDToTypeID('IRDt'), charIDToTypeID('Dfsn') );
            desc9.putInteger( charIDToTypeID('DthA'), 100 );
            desc9.putInteger( charIDToTypeID('DChS'), 0 );
            desc9.putInteger( charIDToTypeID('DCUI'), 0 );
            desc9.putBoolean( charIDToTypeID('DChT'), false );
            desc9.putBoolean( charIDToTypeID('DChV'), false );
            desc9.putInteger( charIDToTypeID('WebS'), 0 );
            desc9.putEnumerated( charIDToTypeID('TDth'), charIDToTypeID('IRDt'), charIDToTypeID('None') );
            desc9.putInteger( charIDToTypeID('TDtA'), 100 );
            desc9.putBoolean( charIDToTypeID('Trns'), true );
            desc9.putBoolean( charIDToTypeID('Mtt '), false );
            desc9.putInteger( charIDToTypeID('MttR'), 255 );
            desc9.putInteger( charIDToTypeID('MttG'), 255 );
            desc9.putInteger( charIDToTypeID('MttB'), 255 );
            desc9.putBoolean( charIDToTypeID('SHTM'), false );
            desc9.putBoolean( charIDToTypeID('SImg'), true );
            desc9.putBoolean( charIDToTypeID('SSSO'), false );
                var list3 = new ActionList();
            desc9.putList( charIDToTypeID('SSLt'), list3 );
            desc9.putBoolean( charIDToTypeID('DIDr'), false );
            desc9.putPath( charIDToTypeID('In  '),File( saveFile) );
        desc8.putObject( charIDToTypeID('Usng'), stringIDToTypeID('SaveForWeb'), desc9 );
        executeAction( charIDToTypeID('Expr'), desc8, DialogModes.NO );
    function FitImage( inWidth, inHeight ) {
    if ( inWidth == undefined || inHeight == undefined ) {
      alert( "FitImage requires both Width & Height!");
      return;
    var desc = new ActionDescriptor();
    var unitPixels = charIDToTypeID( '#Pxl' );
    desc.putUnitDouble( charIDToTypeID( 'Wdth' ), unitPixels, inWidth );
    desc.putUnitDouble( charIDToTypeID( 'Hght' ), unitPixels, inHeight );
    var runtimeEventID = stringIDToTypeID( "3caa3434-cb67-11d1-bc43-0060b0a13dc4" );
    executeAction( runtimeEventID, desc, DialogModes.NO );

  • Batch Saving jpg from Camera Raw PSE 6 for Mac

    I'm running PSE 6 for Mac.  I'm shooting in RAW to retain all  data from sensor.  My work flow is straight forward.
    Review photos on CF card and do initial throw away of bad photos. 
    Download from CF card to Backup drive to preserve original photos. 
    I upload photos to Bridge, keyword, grade, and copywrite, etc. then open in Camera Raw and process as necessary; exposure, recovery, sharpen, fill-in, crop, fill-in etc.
    Select all and do a save (default is .png) to save my changes.  Since Camera Raw will not save to jpg format I open in PSE6
    My workflow can change here depending on what my end product will be but usually I'll send some photos out to share which is the subject of another post.  I can't make the program resize more than one photo for email even though I have all of the photos I want to email selected in the film strip.
    Anyway my process for batch saving to jpg is as follows:
    Select all of the photos (I will select only those that have been cropped to the same size such as 4x6) in the film strip.
    Open File > Process Multiple Files
    Fill out the dialogue box (see attachment) and press OK
    The next thing that happens completely negates the automated process, I get the Save As Dialogue box for every photo (see attached)
    I delete the "copy" text and save
       6.  Some of the photos turn out black under preview in finder
       7.  When I try to reopen the jpg in PSE6 I get an error message (see attachment)
    Any help is appreciated.

    love2kruz wrote:
    I'm running PSE 6 for Mac.  I'm shooting in RAW to retain all  data from sensor.  My work flow is straight forward.
    Review photos on CF card
    Stop right there!  That's a very bad idea.   You should not be viewing images that are still on the card.  Download them to your local hard drive first.  Otherwise you run the risk of the software writing to the card and destroying the format.
    This excerpt is from a long-gone post by author Bruce Fraser:
    Bruce Fraser - 4:17pm Jun 14, 04 PST (#5 of 21)
    Opening files directly from the camera is a bad idea for a variety of reasons*, and it most certainly isn't faster than using a FireWire or USB2 card reader.
             • Drains the camera battery
             • Runs the risk of the software you're using to open the images writing to the card and destroying the format
             • Runs a small but significant risk of USB power frying the camera
             • Slowest method known to mankind of getting images off a CF or SD card

  • Loading, cropping and saving jpg files in Flex

    I'm attempting to apply the code for selecting, cropping and saving image data (.jpg, .png) as shown on the web site:
    http://www.adobe.com/devnet/flash/quickstart/filereference_class_as3.html#articlecontentAd obe_numberedheader_1
    The sample application is contained within a class called Crop contained in the action script file Crop.as which begins as follows:
    package
        import com.adobe.images.JPGEncoder;
        import com.adobe.images.PNGEncoder;
        import flash.display.BitmapData;
        import flash.display.DisplayObject;
        import flash.display.DisplayObjectContainer;
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        import flash.events.MouseEvent;
        import flash.geom.Matrix;
        import flash.geom.Rectangle;
        import flash.net.FileFilter;
        import flash.net.FileReference;
        import flash.utils.ByteArray;
        public class Crop extends Sprite
    My application attempts to make use of the Crop class by including the Crop.as file:
         <mx:Script source="Crop.as"/> 
    in the Flex Component which needs it, and then calling the Crop constructor to perform the methods of the class
       var localImage:Crop = new Crop();
       localImage.Crop();
    My application does not compile. The package statement (or the curly bracket on the following line) is flagged with the error "Packages may not be nested".
    I have no idea why this should be as I cannot see any nested definitions anywhere in my application. The component includes the Crop.as file which contains the package and class definition.
    Can anyone give my some guidance as to why this error is occurring?
    Any help would be greatly appreciated.  

    Hi Scott,
    #1
    that error is because "fx:Script" (or mx:Script) are intended to include part of Actionscript code - but not class defitions or blocks.
    So if you are trying to include e.g. such class:
    package
         import flash.display.Sprite;
         public class Crop extends Sprite
              public function Crop()
                   super();
              public function processImage():void
                   trace("processImage()");
    compiler will immediately complain as you are trying to incorporate nested class within your application code.
    #2
    here is correct way (I think) to incorporate some class via mxml tags (here using fx:Script):
    Using class sample above:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx"
                      xmlns:utils="*"
                      applicationComplete="completeHandler(event)">
         <!-- util Crop will be initialized here as instance "cropUtil" -->
         <fx:Declarations>
              <utils:Crop id="cropUtil"/>
         </fx:Declarations>
         <!-- script where "cropUtil" will be used -->
         <fx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
                   protected function completeHandler(event:FlexEvent):void
                        cropUtil.processImage();
              ]]>
         </fx:Script>
    </s:Application>
    But note that you could simply create instance of your class by direct import in fx:Script:
         <fx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
                   private var cropUtil:Crop = null;
                   protected function completeHandler(event:FlexEvent):void
                        cropUtil = new Crop();
                        cropUtil.processImage();
              ]]>
         </fx:Script>
    hth,
    kind regards,
    Peter Blazejewicz

  • Illustrator CS6 color issues when saving JPG

    I have recently gotten rid of the Pantone+ color books and replaced them with the old color books, using the "Workaround 1: Replace Pantone Plus with older Pantone color books" help from Adobe. Followed all of the instrauctions and had no issues until two weeks ago. Then suddenly when saving PDFs I had to start changing the output Color Conversion to ' convert to destination'. I never had to take this extra step before. Now if I do not do this it saves some colors as black. Whatever, I got over that and take the extra step.
    TODAY, now I can't even save JPGs without color issues. Some JPGs save correctly. Then I use the same color in a different file, and it saves completely different. Same color profiles, swatch options, blah blah blah.
    Someone help me. I am extremely fed up with these issues. Like everyone else, this is my job and now it is making a huge impact on my work...

    What program are you using to view the PDFs?

  • Can we start a relatively elementary thread about the quality level of a saved .jpg file and its relation to camera resolution settings, if any?

    My daughter has thousands of photos shot with a maximum resolution setting on her camera, each one occupying an approximately 4 MB file and apparently capable of generating a quality 32x48 print -- clearly a case of overkill.  I think she's doing it because she thinks it will maximize print quality.  I know it's exhausting our disk space.
    In PSE9, I've taken a sample .jpg file (4 MB) and saved it as three .jpg files: at maximum quality (5.2 MB), 50% quality (934 KB), and minimum quality (359 KB).  Note that the minimum quality file represents a 90% reduction in disk space! Then for each of these four sizes, I printed it on letter-size plain paper, and again on 4x6 photo paper.  They looked identical to me.  I asked her to compare them (she did not know which photos had which quality) and with her calibrated eyeballs she thought that the minimum quality was a bit more "pixellated".
    I successfully experimented with the editor's "Process Multiple Files" to resize the photos and I am pleased with its performance on my iMac -- less than seven minutes to convert 197 photos.  As a further test,  I ran 5 photos four times: low-quality and high quality, each at 300 dpi and 600 dpi.  Again I saw no apparent difference between 300 dpi low and high quality on letter-size plain paper, but I was taken aback to see the 600 dpi print as approx. 4x6 in the center of the letter-size paper.  I took another look at the four of them in the PSE workplace, and sure enough, the 300 dpi files showed up approximately letter-sized and the 600 dpi files showed up as approximately 4x6.
    Obviously I'm dealing with apples and oranges here, and this is why I'd like to see some elementary-level conversation on this subject.

    Thanks for the hints, Lundberg. Google led to ImageJ. Rather difficult to understand what it does, but fun to play around with. Further reading led me to this statement:
    Another sinusoidal transform (i.e. transform with sinusoidal base functions) related to the DFT is the Discrete Cosine Transform (DCT).
    And since jpeg is based on the DCT I thought: simply compressing an image at jpeg and looking at the file size will probably give info re the sharpness of the image. At maximum jpeg setting, there was a significant reduction in file size for a particular image when I applied a Gaussian Blur. So all I have to do is work out how to relate the jpeg file size to the minimum acceptable resolution.
    Anyway, thanks for the suggestion.

  • Issue with saving JPG's

    I have an issue with Photoshop CC that I am hoping is just a setting because at present it is a real PITA.
    I have photos in Lightroom that I have exported in JPG format. I want to bring them into PS and then apply a simple crop to them. I have the option to delete outside the crop area selected.
    Crop works fine but when I try to save I can simply save it as a JPG. Rather PSD comes up as the option. If I select JPEG from the dropdown the "Save as copy" is active and I end up with two images or I have to change the file name.
    Other versions let me open up JPGs, alter them and then save them as JPGs without issue so what is going on here?

    Usually when Photoshop defaults to PSD it means there's something about the document can't be saved in JPEG format - an extra channel (e.g., selection saved) or data beyond the edge of the crop (you've covered that) or the fact that it has a non-Background layer, or something...
    Can you screengrab your environment at the time when it wants to save as PSD (but without the file-save dialog blocking the view)?  Save the image as a PNG or JPEG and post it here via the little camera icon just above the editor box.
    -Noel

  • Load, crop and saving jpg and gif images with JFileChooser

    Hello!
    I wonder is there someone out there who can help me with a applic that load, (crop) and saving images using JFileChooser with a simple GUI as possible. I'm new to programming and i hope someone can show me.
    Tor

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    import javax.swing.filechooser.FileFilter;
    public class ChopShop extends JPanel {
        JFileChooser fileChooser;
        BufferedImage image;
        Rectangle clip = new Rectangle(50,50,150,150);
        boolean showClip = true;
        public ChopShop() {
            fileChooser = new JFileChooser(".");
            fileChooser.setFileFilter(new ImageFilter());
        public void setClip(int x, int y) {
            clip.setLocation(x, y);
            repaint();
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(image != null) {
                int x = (getWidth() - image.getWidth())/2;
                int y = (getHeight() - image.getHeight())/2;
                g2.drawImage(image, x, y, this);
            if(showClip) {
                g2.setPaint(Color.red);
                g2.draw(clip);
        public Dimension getPreferredSize() {
            int width = 400;
            int height = 400;
            int margin = 20;
            if(image != null) {
                width = image.getWidth() + 2*margin;
                height = image.getHeight() + 2*margin;
            return new Dimension(width, height);
        private void showOpenDialog() {
            if(fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
                File file = fileChooser.getSelectedFile();
                try {
                    image = ImageIO.read(file);
                } catch(IOException e) {
                    System.out.println("Read error for " + file.getPath() +
                                       ": " + e.getMessage());
                    image = null;
                revalidate();
                repaint();
        private void showSaveDialog() {
            if(image == null || !showClip)
                return;
            if(fileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
                File file = fileChooser.getSelectedFile();
                String ext = ((ImageFilter)fileChooser.getFileFilter()).getExtension(file);
                // Make sure we have an ImageWriter for this extension.
                if(!canWriteTo(ext)) {
                    System.out.println("Cannot write image to " + ext + " file.");
                    String[] formatNames = ImageIO.getWriterFormatNames();
                    System.out.println("Supported extensions are:");
                    for(int j = 0; j < formatNames.length; j++)
                        System.out.println(formatNames[j]);
                    return;
                // If file exists, warn user, confirm overwrite.
                if(file.exists()) {
                    String message = "<html>" + file.getPath() + " already exists" +
                                     "<br>Do you want to replace it?";
                    int n = JOptionPane.showConfirmDialog(this, message, "Confirm",
                                                          JOptionPane.YES_NO_OPTION);
                    if(n != JOptionPane.YES_OPTION)
                        return;
                // Get the clipped image, if available. This is a subImage
                // of image -> they share the same data. Handle with care.
                BufferedImage clipped = getClippedImage();
                if(clipped == null)
                    return;
                // Copy the clipped image for safety.
                BufferedImage cropped = copy(clipped);
                boolean success = false;
                // Write cropped to the user-selected file.
                try {
                    success = ImageIO.write(cropped, ext, file);
                } catch(IOException e) {
                    System.out.println("Write error for " + file.getPath() +
                                       ": " + e.getMessage());
                System.out.println("writing image to " + file.getPath() +
                                   " was" + (success ? "" : " not") + " successful");
        private boolean canWriteTo(String ext) {
            // Support for writing gif format is new in j2se 1.6
            String[] formatNames = ImageIO.getWriterFormatNames();
            //System.out.printf("writer formats = %s%n",
            //                   java.util.Arrays.toString(formatNames));
            for(int j = 0; j < formatNames.length; j++) {
                if(formatNames[j].equalsIgnoreCase(ext))
                    return true;
            return false;
        private BufferedImage getClippedImage() {
            int w = getWidth();
            int h = getHeight();
            int iw = image.getWidth();
            int ih = image.getHeight();
            // Find origin of centered image.
            int ix = (w - iw)/2;
            int iy = (h - ih)/2;
            // Find clip location relative to image origin.
            int x = clip.x - ix;
            int y = clip.y - iy;
            // clip must be within image bounds to continue.
            if(x < 0 || x + clip.width  > iw || y < 0 || y + clip.height > ih) {
                System.out.println("clip is outside image boundries");
                return null;
            BufferedImage subImage = null;
            try {
                subImage = image.getSubimage(x, y, clip.width, clip.height);
            } catch(RasterFormatException e) {
                System.out.println("RFE: " + e.getMessage());
            // Caution: subImage is not independent from image. Changes
            // to one will affect the other. Copying is recommended.
            return subImage;
        private BufferedImage copy(BufferedImage src) {
            int w = src.getWidth();
            int h = src.getHeight();
            BufferedImage dest = new BufferedImage(w, h, src.getType());
            Graphics2D g2 = dest.createGraphics();
            g2.drawImage(src, 0, 0, this);
            g2.dispose();
            return dest;
        private JPanel getControls() {
            JPanel panel = new JPanel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.weightx = 1.0;
            gbc.fill = GridBagConstraints.HORIZONTAL;
            gbc.gridwidth = GridBagConstraints.REMAINDER;
            panel.add(getCropPanel(), gbc);
            panel.add(getImagePanel(), gbc);
            return panel;
        private JPanel getCropPanel() {
            JToggleButton toggle = new JToggleButton("clip", showClip);
            toggle.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    showClip = ((AbstractButton)e.getSource()).isSelected();
                    repaint();
            SpinnerNumberModel widthModel = new SpinnerNumberModel(150, 10, 400, 1);
            final JSpinner widthSpinner = new JSpinner(widthModel);
            SpinnerNumberModel heightModel = new SpinnerNumberModel(150, 10, 400, 1);
            final JSpinner heightSpinner = new JSpinner(heightModel);
            ChangeListener cl = new ChangeListener() {
                public void stateChanged(ChangeEvent e) {
                    JSpinner spinner = (JSpinner)e.getSource();
                    int value = ((Number)spinner.getValue()).intValue();
                    if(spinner == widthSpinner)
                        clip.width = value;
                    if(spinner == heightSpinner)
                        clip.height = value;
                    repaint();
            widthSpinner.addChangeListener(cl);
            heightSpinner.addChangeListener(cl);
            JPanel panel = new JPanel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(2,2,2,2);
            gbc.weightx = 1.0;
            panel.add(toggle, gbc);
            addComponents(new JLabel("width"),  widthSpinner,  panel, gbc);
            addComponents(new JLabel("height"), heightSpinner, panel, gbc);
            return panel;
        private void addComponents(Component c1, Component c2, Container c,
                                   GridBagConstraints gbc) {
            gbc.anchor = GridBagConstraints.EAST;
            c.add(c1, gbc);
            gbc.anchor = GridBagConstraints.WEST;
            c.add(c2, gbc);
        private JPanel getImagePanel() {
            final JButton open = new JButton("open");
            final JButton save = new JButton("save");
            ActionListener al = new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    JButton button = (JButton)e.getSource();
                    if(button == open)
                        showOpenDialog();
                    if(button == save)
                        showSaveDialog();
            open.addActionListener(al);
            save.addActionListener(al);
            JPanel panel = new JPanel();
            panel.add(open);
            panel.add(save);
            return panel;
        public static void main(String[] args) {
            ChopShop chopShop = new ChopShop();
            ClipMover mover = new ClipMover(chopShop);
            chopShop.addMouseListener(mover);
            chopShop.addMouseMotionListener(mover);
            JFrame f = new JFrame("click inside rectangle to drag");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new JScrollPane(chopShop));
            f.getContentPane().add(chopShop.getControls(), "Last");
            f.pack();
            f.setLocation(200,100);
            f.setVisible(true);
    class ImageFilter extends FileFilter {
        static String GIF = "gif";
        static String JPG = "jpg";
        static String PNG = "png";
        // bmp okay in j2se 1.5+
        public boolean accept(File file) {
            if(file.isDirectory())
                return true;
            String ext = getExtension(file).toLowerCase();
            if(ext.equals(GIF) || ext.equals(JPG) || ext.equals(PNG))
                return true;
            return false;
        public String getDescription() {
            return "gif, jpg, png images";
        public String getExtension(File file) {
            String s = file.getPath();
            int dot = s.lastIndexOf(".");
            return (dot != -1) ? s.substring(dot+1) : "";
    class ClipMover extends MouseInputAdapter {
        ChopShop component;
        Point offset = new Point();
        boolean dragging = false;
        public ClipMover(ChopShop cs) {
            component = cs;
        public void mousePressed(MouseEvent e) {
            Point p = e.getPoint();
            if(component.clip.contains(p)) {
                offset.x = p.x - component.clip.x;
                offset.y = p.y - component.clip.y;
                dragging = true;
        public void mouseReleased(MouseEvent e) {
            dragging = false;
        public void mouseDragged(MouseEvent e) {
            if(dragging) {
                int x = e.getX() - offset.x;
                int y = e.getY() - offset.y;
                component.setClip(x, y);
    }

  • Speed up saving of layered files?

    In CS4, on a first generation quad core Mac Pro with 12 gigs of RAM and scratch and all image files on a fast two disk RAID 0, I find that saving psd files with layers is extremely slow.
    If I open a 16 bit 12 megapixel D300 raw image from Lightroom into Photoshop, and immediately save it, it takes just 1 to 2 seconds to save the 60 megabyte file. But if I duplicate the background layer and save again, it takes about 15 seconds. If I duplicate two more times so there are four layers, it takes over 30 seconds to re-save the now 286 megabyte file.
    Why does this take so long? Are these numbers normal? Is there anything that can be done to speed this up? I can duplicate the file in Finder in less than 4 seconds, so I assume this has nothing to do with disk bandwidth.
    And why does saving files have to be modal? If I could start the save then switch over and start working on a different image I really wouldn't care how long it took.

    If you save with maximum compatibility, we have to composite (flatten) the document and save that PLUS the layer contents. That takes extra time.
    Yes, without major changes, saving has to be modal (due to disk access, error handling, etc.).
    Opening a file is decompressing - easy.
    Saving a file is compressing - SLOW.

  • Increasing Write Speeds while saving files?...

    While i love Photoshop, its performance can be a huge concern. Lately, i upgraded my workstation from a 4 year old desktop and went all out...
    Here are the specs of the new system.
    2 x X5670 (12 Nehalem 2.93Ghz cores)
    48GB of ECC RAM
    3 x 50GB (raid 0 on LSI 5150 sata 3 raid card) Sandforce SSD drives that give me sequential read/write speeds of approx 800MBps.
    My issue is that i hate the way photoshop writes data while saving PSD files. I cant seem to see photoshop write to disk at speeds greater than 12-15 MBps. This has become the slowest link in the entire photoshop work flow and is slowing me down considerably.
    The other option i was trying to investigate is to edit loads of files and then do an equivalent of a bulk save but i cant find a trick to do that.
    thoughts?

    thanks Noel for the speedy response. I will admit that i oversimplified my setup but here is the full info for my setup...
    I gave the save as tiff a go but DID see a dramatic increase!!
    C Drive:
    T Drive: 40GB Fusion i/o PCI card. Photoshop uses this as the scratch disk (under preferences --> general --> performance).
    P.S: my systems temp variables (user and env) etc are all redirected to this drive.
    I have a D Drive (Raid 5 across 6 x 2TB drives that i use purely for storage)
    Here is what all i am doing...
    Open a raw nef file,
    Use define to reduce noise (automatic profile)
    Use Viveza to adjust brightness/contrast/structure/warmth
    save the file
    These are some timings...
    Loading photoshop --> 4.5 sec
    Opening a D7000 16MPix raw image --> 8.5 sec (file opens in camera raw and then i click open to open in photoshop)
    Times to save processed files...
    PSD: 28.5 seconds!!!!
    Tiff: 2.5 seconds!!! yes 2.5 seconds (you barely see it save!!)
    You are the man...
    i would assume that i have the CPU and RAM horsepower to have photoshop do a good job at the compression while saving but the diffrence is huge!!!
    now please tell me what do i lose (if anything) in moving to the Tiff format (preserving all layers)

  • Saving JPG with exif 2.1

    I have a Sony TV with USB media port. It will not display images which were saved in Photoshop Elements 9, because the Sony requires JPG EXIF 2.1 format. How can I save files in APE in that format?

    I'm having the opposite trouble. All of a sudden, Aperture refuses to show thumbnails or download images from my Nikon D-50, but I can get them using Image Capture and then import from the hard disk.

  • CS2 & Vista error when saving JPG

    Not sure its a VIsta thing
    WHen I go to save a 8bit RGB file as a JPG, I get an error that says "could not complete your request because of a program error."
    Its been working fine til today.
    Any help??
    George

    I'm having the exact same problem as the original poster.  If I create a new file and save as JPG, it works fine.  The file I'm trying to save as JPG also works fine if I do "Save for Web" instead of "Save AS" and select JPG as the format.  I can save it as TIFF too.  Only when I try to save the file as JPG, embedding the profile (and the meta data that came from LightRoom) do I get this error.
    I'm also running CS2 under Vista, in my case Vista 64.   Yes, I know I should upgrade to CS4. :-)

  • Saving .jpg files using Photoshop elements 11

    I'm having troupble uing "save" and "save as" in Photoshop Elements 11.  This just started happening about a month ago.  Appprox. half the pictures I save do not appear in the designate file.  Instead a box with "JPG" inside appears.  The only way I can see the actual picture is to use a different application and resave.  I have an Apple.  Can anyone help with this?

    Then it is absolutely vital to delete the preferences. You must do this for PSE every time you do  a major OS X upgrade, like from 10.7 to 10.8 or from 10.8 to 10.9.
    For PSE 11, the files you want are
    com.adobe.PhotoshopElements.plist
    Adobe Photoshop Elements 11 paths
    Adobe Photoshop Elements 11 settings
    and any lockfiles with the same names. If you use the organizer, also look for anything starting with com.adobe.Elements Organizer.
    General directions are here:
    http://barbarabrundage.com/2013/10/28/photoshop-elements-and-os-x-mavericks/
    And take your finder windows out of cover flow view, if you've been using that--there's a known bug between mavericks  cover flow view and adobe products.

Maybe you are looking for

  • Task flow-call  as a Dialog with inline-popup issue JDev 11.1.1.2.0

    I have a very serious issue with task flow-call running as a Dialog with inline-popup have bunch of data driven table components pointing to pageDefs with Iterators the problem is, the dialog comes first with nothing in it (blank) and it takes 3-5 se

  • Report Painter, G/L account as characteristic and data selection

    Hi experts, I'm creating a report on report painter (grr1) and i'm using as characteristic gl account. Now i need to use gl account on selection screen too. So for that I created a variable of set. In selection screen that field is available to set w

  • HT1349 can't check updates for my ipod via itunes

    i cant check software updates for my ipod and there's a notification saying a network error. i try to run diagnostic through i tunes and this is the result :   Microsoft Windows 7 x64 Home Premium Edition (Build 7600) Sony Corporation VPCEA36FM iTune

  • Condition type splits in billing

    Hello, We are using condition type to charge minimum price of $20 every time we ship from an order. Sometime we ship partial instead of the full order , whenever we ship partial system splits the condition type value in half. For example, if we have

  • Icons are inactive - impossible to sync

    When  BB in connected via USB, at the BB Desktop Software, right upper corner appears " CONNECTED", at the bottom does not appear the BB PIN. I have version 5.0.1. All the Icons are inactive so it is impossible to sync. The BB Device manager recogniz