]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/gui/PhotoThumbnail.java
Version 13, August 2011
[GpsPrune.git] / tim / prune / gui / PhotoThumbnail.java
index 686d90a1ac1eff972a0b20380e40e2cf03c05ea9..3e8b093a644c5c57ddfa2a078210b964be346e29 100644 (file)
@@ -148,7 +148,7 @@ public class PhotoThumbnail extends JPanel implements Runnable
                                        // calculate maximum thumbnail size
                                        Dimension thumbSize = ImageUtils.getThumbnailSize(picWidth, picHeight, DEFAULT_THUMB_SIZE, DEFAULT_THUMB_SIZE);
                                        // Make icon to load image into
-                                       Image image = new ImageIcon(_photo.getFile().getAbsolutePath()).getImage();
+                                       Image image = _photo.createImageIcon().getImage();
                                        // save scaled, smoothed thumbnail for reuse
                                        _thumbnail = ImageUtils.createScaledImage(image, thumbSize.width, thumbSize.height);
                                        image = null;
@@ -157,7 +157,7 @@ public class PhotoThumbnail extends JPanel implements Runnable
                        }
                }
                else {
-                       _thumbnail = new ImageIcon(_photo.getFile().getAbsolutePath()).getImage();
+                       _thumbnail = _photo.createImageIcon().getImage();
                }
                _loadingImage = false;
                repaint();