This project has moved and is read-only. For the latest updates, please go here.

GdalRasterLayer to show Single Image(most be out of sharp)

Topics: SharpMap v0.9 / v1.x
Jul 15, 2013 at 8:38 AM
I use GdalRasterLayer to show single image within SharpMap as below
    public static SharpMap.Map InitializeMap(int angle, string[] filenames)
        var map = new SharpMap.Map();
        for (int i = 0; i < filenames.Length; i++)
            map.Layers.Add(new SharpMap.Layers.GdalRasterLayer(System.IO.Path.GetFileName(filenames[i]), filenames[i]));

        System.Drawing.Drawing2D.Matrix mat = new System.Drawing.Drawing2D.Matrix();
        mat.RotateAt(angle, map.WorldToImage(map.Center));
        map.MapTransform = mat;
        return map;
mapBox1.Map = InitializeMap(tbAngle.Value);
.bmp works good
.jpg .tif .gif .png are out of sharp.

Is there any method to make all single image worked on sharpmap?
Jul 15, 2013 at 9:48 AM
zhaojun20002003 wrote:
.jpg .tif .gif .png are out of sharp.
What does that mean?
Jul 15, 2013 at 4:46 PM
I think they mean shape.....'out of shape'
Jul 16, 2013 at 2:13 AM
Edited Jul 16, 2013 at 2:22 AM
.jpg .tif .gif .png mean the format of image. I have a jpg image,opened with image editer and saved as: .bmp ,.tif,.png and so on.

when I use them to work with GdalRasterLayer, just ".bmp" image can work right. Please help.