Index: /applications/editors/josm/plugins/piclayer/build.xml
===================================================================
--- /applications/editors/josm/plugins/piclayer/build.xml	(revision 28558)
+++ /applications/editors/josm/plugins/piclayer/build.xml	(revision 28559)
@@ -22,5 +22,5 @@
 -->
 <project name="PicLayer" default="dist" basedir=".">
-    <property name="commit.message" value="PicLayer - added possibility to edit transformation with 1 or 2 points (move or rect transformation)"/>
+    <property name="commit.message" value="PicLayer - #7127 - added world file loading option"/>
     <property name="plugin.main.version" value="4980"/>
     <!--
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java	(revision 28558)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java	(revision 28559)
@@ -48,7 +48,9 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
+import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.plugins.piclayer.actions.LoadPictureCalibrationAction;
+import org.openstreetmap.josm.plugins.piclayer.actions.LoadPictureCalibrationFromWorldAction;
 import org.openstreetmap.josm.plugins.piclayer.actions.ResetCalibrationAction;
 import org.openstreetmap.josm.plugins.piclayer.actions.SavePictureCalibrationAction;
@@ -121,4 +123,6 @@
     private static final int pinHeight = 64;
 
+    protected final Projection projection;
+
     /**
      * Constructor
@@ -137,4 +141,6 @@
             pinTiledImage = new ImageIcon(Toolkit.getDefaultToolkit().createImage(getClass().getResource("/images/v6_64.png"))).getImage();
         }
+
+        projection = Main.getProjection();
     }
 
@@ -201,4 +207,5 @@
                 new SavePictureCalibrationAction(this),
                 new LoadPictureCalibrationAction(this),
+                new LoadPictureCalibrationFromWorldAction(this),
                 SeparatorLayerAction.INSTANCE,
                 new RenameLayerAction(null,this),
@@ -302,10 +309,10 @@
          * so we get the result at the point 'en' and not some average.
          */
-        double naturalScale = Main.getProjection().getDefaultZoomInPPD();
+        double naturalScale = projection.getDefaultZoomInPPD();
         naturalScale *= 0.01; // make a little smaller
 
-        LatLon ll1 = Main.getProjection().eastNorth2latlon(
+        LatLon ll1 = projection.eastNorth2latlon(
                 new EastNorth(en.east() - naturalScale, en.north()));
-        LatLon ll2 = Main.getProjection().eastNorth2latlon(
+        LatLon ll2 = projection.eastNorth2latlon(
                 new EastNorth(en.east() + naturalScale, en.north()));
 
@@ -316,10 +323,10 @@
     /* see getMetersPerEasting */
     private double getMetersPerNorthing(EastNorth en) {
-        double naturalScale = Main.getProjection().getDefaultZoomInPPD();
+        double naturalScale = projection.getDefaultZoomInPPD();
         naturalScale *= 0.01;
 
-        LatLon ll1 = Main.getProjection().eastNorth2latlon(
+        LatLon ll1 = projection.eastNorth2latlon(
                 new EastNorth(en.east(), en.north()- naturalScale));
-        LatLon ll2 = Main.getProjection().eastNorth2latlon(
+        LatLon ll2 = projection.eastNorth2latlon(
                 new EastNorth(en.east(), en.north() + naturalScale));
 
@@ -337,5 +344,5 @@
         if ( image == null )
             return;
-        String projcode = Main.getProjection().toCode();
+        String projcode = projection.toCode();
 
         // TODO: bounding box only supported when coordinates are in meters
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromKML.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromKML.java	(revision 28558)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromKML.java	(revision 28559)
@@ -8,5 +8,4 @@
 import javax.imageio.ImageIO;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -53,6 +52,6 @@
         LatLon coord2 = new LatLon(cal.getSouth(), cal.getWest());
 
-        EastNorth en1 = Main.getProjection().latlon2eastNorth(coord1);
-        EastNorth en2 = Main.getProjection().latlon2eastNorth(coord2);
+        EastNorth en1 = projection.latlon2eastNorth(coord1);
+        EastNorth en2 = projection.latlon2eastNorth(coord2);
 
 
