# PNG rendering

**URL:** <https://community.thinkgeo.com/t/png-rendering/328>\
**Category:** WinForms\
**Created:** [April 3, 2009, 4:31am UTC](https://community.thinkgeo.com/t/png-rendering/328 "2009-04-03T04:31:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![John4](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/e0b2c6/32.png) [@John4](https://community.thinkgeo.com/u/John4)\
**Post date:** [April 3, 2009, 4:31am UTC](https://community.thinkgeo.com/t/png-rendering/328/1 "2009-04-03T04:31:14Z")

</div>

Hi&nbsp;Guys,

Anyone&nbsp;know&nbsp;how&nbsp;to&nbsp;get&nbsp;a&nbsp;PNG&nbsp;file&nbsp;displayed&nbsp;without&nbsp;being&nbsp;antialiased&nbsp;or&nbsp;"fiddled&nbsp;with"?

Below&nbsp;are&nbsp;two&nbsp;images,&nbsp;the&nbsp;first&nbsp;is&nbsp;a&nbsp;ThinkGeo&nbsp;image&nbsp;and&nbsp;the&nbsp;second&nbsp;the&nbsp;same&nbsp;PNG&nbsp;from&nbsp;Paint.&nbsp;&nbsp;The&nbsp;ThinkGeo&nbsp;image&nbsp;looks&nbsp;fuzzy&nbsp;as&nbsp;if&nbsp;it&nbsp;had&nbsp;been&nbsp;antialiased.

Screen&nbsp;shot&nbsp;was&nbsp;with&nbsp;CompositingQuality&nbsp;Default,DrawingQuality&nbsp;HighSpeed,&nbsp;SmoothingMode&nbsp;HighSpeed&nbsp;and&nbsp;TextRenderingHint&nbsp;SingleBitPerPixelGridFit.

I&nbsp;know&nbsp;the&nbsp;two&nbsp;images&nbsp;look&nbsp;fairly&nbsp;similar&nbsp;but&nbsp;when&nbsp;displayed&nbsp;at&nbsp;2560\*1600&nbsp;the&nbsp;ThinkGeo&nbsp;image&nbsp;becomes&nbsp;quite&nbsp;tiring&nbsp;on&nbsp;the&nbsp;eyes.

 ![](https://community.thinkgeo.com/uploads/default/original/1X/a284b7e2a0c1bfe74a56434961ae1e0adae316d8.jpg)

 ![](https://community.thinkgeo.com/uploads/default/original/1X/d3d780efc7ab250a8a8e0d0dc82ea40dc35e0e74.jpg)

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [April 8, 2009, 12:28am UTC](https://community.thinkgeo.com/t/png-rendering/328/2 "2009-04-08T00:28:20Z")

</div>

&nbsp;

John,

I&nbsp;think&nbsp;that's&nbsp;because&nbsp;the&nbsp;png&nbsp;is&nbsp;stretched.&nbsp;I&nbsp;tried&nbsp;the&nbsp;same&nbsp;png&nbsp;file&nbsp;and&nbsp;make&nbsp;it&nbsp;drawing&nbsp;on&nbsp;map&nbsp;without&nbsp;any&nbsp;stretching,&nbsp;it&nbsp;looks&nbsp;the&nbsp;same&nbsp;as&nbsp;displayed&nbsp;in&nbsp;Windows&nbsp;Paint.

 ![](https://community.thinkgeo.com/uploads/default/original/2X/4/47c8256369f6d72d972677572560c591f25fc661.png)

Here&nbsp;is&nbsp;the&nbsp;demo&nbsp;how&nbsp;to&nbsp;show&nbsp;the&nbsp;png&nbsp;without&nbsp;any&nbsp;stretching.&nbsp;You&nbsp;can&nbsp;see&nbsp;as&nbsp;the&nbsp;png&nbsp;is&nbsp;277\*197,&nbsp;I&nbsp;made&nbsp;the&nbsp;control&nbsp;size&nbsp;to&nbsp;277&nbsp;\*&nbsp;197&nbsp;and&nbsp;made&nbsp;the&nbsp;extent's&nbsp;with&nbsp;and&nbsp;height&nbsp;with&nbsp;the&nbsp;ratio&nbsp;277:197.

Let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;issues.

Thanks,

Ben

[561-TestPNGDisplaying.zip](https://community.thinkgeo.com/uploads/default/original/2X/7/72d5946c8e1ea95e43b755d640bf7a5de218e3c1.zip) (38.6 KB)

---

<div class="post-metadata">

**Author:** ![John4](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/e0b2c6/32.png) [@John4](https://community.thinkgeo.com/u/John4)\
**Post date:** [April 8, 2009, 12:51am UTC](https://community.thinkgeo.com/t/png-rendering/328/3 "2009-04-08T00:51:16Z")

</div>

Hi&nbsp;Ben,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;that,&nbsp;that&nbsp;gives&nbsp;me&nbsp;a&nbsp;clue,&nbsp;that&nbsp;its&nbsp;me&nbsp;thats&nbsp;wrong.&nbsp;&nbsp;The&nbsp;problem&nbsp;I&nbsp;am&nbsp;stuggling&nbsp;with&nbsp;is&nbsp;that&nbsp;the&nbsp;actual&nbsp;PNG&nbsp;size&nbsp;is&nbsp;3199&nbsp;x&nbsp;4877&nbsp;so&nbsp;setting&nbsp;the&nbsp;extent&nbsp;is&nbsp;not&nbsp;an&nbsp;option,&nbsp;I&nbsp;need&nbsp;to&nbsp;calculate&nbsp;and&nbsp;set&nbsp;the&nbsp;scale&nbsp;so&nbsp;that&nbsp;we&nbsp;get&nbsp;true&nbsp;resolution,&nbsp;any&nbsp;thoughts?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;John

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [April 9, 2009, 4:44am UTC](https://community.thinkgeo.com/t/png-rendering/328/4 "2009-04-09T04:44:41Z")

</div>

&nbsp;   
  
 &nbsp;

John,

Here&nbsp;is&nbsp;a&nbsp;small&nbsp;demo&nbsp;how&nbsp;to&nbsp;deal&nbsp;with&nbsp;that.&nbsp;2&nbsp;notes&nbsp;here:&nbsp;1st,&nbsp;the&nbsp;boundingbox&nbsp;of&nbsp;the&nbsp;png&nbsp;layer&nbsp;should&nbsp;have&nbsp;the&nbsp;same&nbsp;ratio&nbsp;of&nbsp;the&nbsp;image's&nbsp;width&nbsp;and&nbsp;height,&nbsp;so&nbsp;for&nbsp;your&nbsp;case&nbsp;it&nbsp;should&nbsp;be&nbsp;3199:4877;&nbsp;2nd,&nbsp;I&nbsp;plus&nbsp;1&nbsp;on&nbsp;the&nbsp;width&nbsp;and&nbsp;height&nbsp;to&nbsp;balance&nbsp;the&nbsp;internal&nbsp;calculation&nbsp;difference&nbsp;(the&nbsp;map&nbsp;will&nbsp;modify&nbsp;the&nbsp;input&nbsp;bounding&nbsp;box&nbsp;according&nbsp;to&nbsp;the&nbsp;control's&nbsp;width&nbsp;and&nbsp;height&nbsp;as&nbsp;its&nbsp;new&nbsp;bounding&nbsp;box,&nbsp;maybe&nbsp;there&nbsp;has&nbsp;some&nbsp;calculation&nbsp;difference,&nbsp;we&nbsp;will&nbsp;have&nbsp;a&nbsp;look&nbsp;at&nbsp;that)&nbsp;I&nbsp;think.&nbsp;You&nbsp;may&nbsp;also&nbsp;need&nbsp;some&nbsp;for&nbsp;your&nbsp;image.

Let&nbsp;me&nbsp;know&nbsp;what's&nbsp;the&nbsp;result.

Thanks,

Ben

&nbsp;

[562-TestPNGDisplaying2.zip](https://community.thinkgeo.com/uploads/default/original/2X/4/477cfff7dd886e9756327d6714caee5c61d31127.zip) (39.2 KB)

---

<div class="post-metadata">

**Author:** ![nagiyev\_serxan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/n/258eb7/32.png) [@nagiyev\_serxan](https://community.thinkgeo.com/u/nagiyev_serxan)\
**Post date:** [March 9, 2010, 8:27am UTC](https://community.thinkgeo.com/t/png-rendering/328/5 "2010-03-09T08:27:26Z")

</div>

I&nbsp;work&nbsp;Thinkgeo&nbsp;Desktop&nbsp;Edition&nbsp;&nbsp;evalution&nbsp;version&nbsp;in&nbsp;C#.&nbsp;  
&nbsp;And&nbsp;I&nbsp;use&nbsp;&nbsp;png&nbsp;image&nbsp;on&nbsp;the&nbsp;map.For&nbsp;this&nbsp;work&nbsp;I&nbsp;use&nbsp;DrawCore.When&nbsp;I&nbsp;pan&nbsp;map,I&nbsp;lost&nbsp;same&nbsp;image.This&nbsp;events&nbsp;hapen,when&nbsp;&nbsp;centerpoint&nbsp;of&nbsp;&nbsp;image&nbsp;not&nbsp;location&nbsp;&nbsp;on&nbsp;map.For&nbsp;example&nbsp;&nbsp;in&nbsp;&nbsp;1.png&nbsp;have&nbsp;image.&nbsp;When&nbsp;I&nbsp;pan&nbsp;map&nbsp;this&nbsp;image&nbsp;is&nbsp;lost&nbsp;(2.png).&nbsp;  
&nbsp;&nbsp;  
&nbsp;This&nbsp;is&nbsp;my&nbsp;code&nbsp;example:&nbsp;  
&nbsp;//Drawcore&nbsp;&nbsp;class&nbsp;worldimage&nbsp;style&nbsp;  
&nbsp;namespace&nbsp;shape\_version&nbsp;  
&nbsp;{&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class&nbsp;Shekiller&nbsp;:&nbsp;Style&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;  
&nbsp;…&nbsp;  
&nbsp;…&nbsp;  
&nbsp;protected&nbsp;override&nbsp;void&nbsp;DrawCore(IEnumerable\<Feature\>&nbsp;features,&nbsp;GeoCanvas&nbsp;canvas,Collection\<SimpleCandidate\>&nbsp;labelsInThisLayer,&nbsp;Collection\<SimpleCandidate\>&nbsp;labelsInAllLayers)&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(image&nbsp;!=&nbsp;null)&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;canvasWidthMeter;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;canvasHeightMeter;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;imageWidthMeter&nbsp;&nbsp;=&nbsp;imageWorldWidth;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;imageHeightMeter&nbsp;=&nbsp;imageWorldHeight;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DistanceUnit&nbsp;fromUnit&nbsp;=&nbsp;DistanceUnit.Meter;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(mapUnit&nbsp;==&nbsp;GeographyUnit.Meter)&nbsp;fromUnit&nbsp;=&nbsp;DistanceUnit.Meter;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;canvasWidthMeter&nbsp;&nbsp;=&nbsp;canvas.CurrentWorldExtent.Width;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;canvasHeightMeter&nbsp;=&nbsp;canvas.CurrentWorldExtent.Height;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float&nbsp;widthSize&nbsp;=&nbsp;(float)((imageWidthMeter&nbsp;\*&nbsp;canvas.Width)&nbsp;/&nbsp;canvasWidthMeter);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float&nbsp;heightSize&nbsp;=&nbsp;(float)((imageHeightMeter&nbsp;\*&nbsp;canvas.Height)&nbsp;/&nbsp;canvasHeightMeter);&nbsp;//fontSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;(Feature&nbsp;feature&nbsp;in&nbsp;features)&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WellKnownType&nbsp;shapeWellKnownType&nbsp;=&nbsp;feature.GetWellKnownType();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(shapeWellKnownType&nbsp;==&nbsp;WellKnownType.Point&nbsp;||&nbsp;shapeWellKnownType&nbsp;==&nbsp;WellKnownType.Multipoint)&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PointShape&nbsp;point&nbsp;=&nbsp;new&nbsp;PointShape(feature.GetWellKnownBinary());&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;canvas.DrawWorldImage(image,&nbsp;point.X,&nbsp;point.Y&nbsp;,widthSize,heightSize,DrawingLevel.LabelLevel,&nbsp;0,&nbsp;0,&nbsp;rotateAngle);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.GC.Collect();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;  
&nbsp;&nbsp;  
&nbsp;//DRawcore&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;void&nbsp;Window\_Loaded(object&nbsp;sender,&nbsp;RoutedEventArgs&nbsp;e)&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wpfMap1.MapUnit&nbsp;=&nbsp;GeographyUnit.Meter;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wpfMap1.BackgroundOverlay.BackgroundBrush&nbsp;=&nbsp;new&nbsp;GeoSolidBrush(GeoColor.FromArgb(255,&nbsp;233,&nbsp;232,&nbsp;214));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShapeFileFeatureLayer&nbsp;evler\_route&nbsp;=&nbsp;new&nbsp;ShapeFileFeatureLayer(@"…\Data\ESRI\polygon.shp");&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;evler\_route.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle&nbsp;=&nbsp;AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.Beige,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GeoColor.FromArgb(100,&nbsp;GeoColor.StandardColors.Chocolate));&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;evler\_route.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20;&nbsp;  
&nbsp;…&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShapeFileFeatureLayer&nbsp;yollar\_shp&nbsp;=&nbsp;new&nbsp;ShapeFileFeatureLayer(@"…\Data\ESRI\polyline.shp");&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yollar\_shp.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(LineStyles.LocalRoad3);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yollar\_shp.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(yollar\_shp.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen.Width&nbsp;\>&nbsp;2)&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yollar\_shp.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.InnerPen.Width&nbsp;-=&nbsp;9;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yollar\_shp.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen.Width&nbsp;-=&nbsp;9;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;…&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShapeFileFeatureLayer&nbsp;qala&nbsp;=&nbsp;new&nbsp;ShapeFileFeatureLayer(@"…\Data\ESRI\Qala.shp");&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qala.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(LineStyles.LocalRoad4);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qala.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;…&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LayerOverlay&nbsp;staticoverlay&nbsp;=&nbsp;new&nbsp;LayerOverlay();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;staticoverlay.Layers.Add("EVLER\_R",&nbsp;evler\_route);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;staticoverlay.Layers.Add("Yollar\_shp",&nbsp;yollar\_shp);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;staticoverlay.Layers.Add("Qala",&nbsp;qala);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wpfMap1.Overlays.Add("Layerler",&nbsp;staticoverlay);&nbsp;  
&nbsp;…&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InMemoryFeatureLayer[]&nbsp;shipInMemoryFeatureLayer&nbsp;=&nbsp;new&nbsp;InMemoryFeatureLayer[29];&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LayerOverlay&nbsp;cemi&nbsp;=&nbsp;new&nbsp;LayerOverlay();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shipInMemoryFeatureLayer[0]&nbsp;=&nbsp;new&nbsp;InMemoryFeatureLayer();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;geoImage[0]&nbsp;=&nbsp;new&nbsp;GeoImage(@"…\Data\image\_web\qalalar.png");&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;en\_1&nbsp;=&nbsp;targetshape\_qala.GetBoundingBox().LowerRightPoint.X&nbsp;-&nbsp;targetshape\_qala.GetBoundingBox().LowerLeftPoint.X;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;uz\_1&nbsp;=&nbsp;targetshape\_qala.GetBoundingBox().UpperLeftPoint.Y&nbsp;-&nbsp;targetshape\_qala.GetBoundingBox().LowerLeftPoint.Y;&nbsp;  
&nbsp;!!!&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shekiller&nbsp;&nbsp;shekil\_transfer[0]&nbsp;=&nbsp;new&nbsp;Shekiller(geoImage[0],&nbsp;GeographyUnit.Meter,&nbsp;en\_1,&nbsp;uz\_1,&nbsp;DistanceUnit.Meter,&nbsp;4);&nbsp;  
&nbsp;!!!&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;shipInMemoryFeatureLayer[0].ZoomLevelSet.ZoomLevel01.CustomStyles.Clear();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shipInMemoryFeatureLayer[0].ZoomLevelSet.ZoomLevel01.CustomStyles.Add(customimage\_style);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shipInMemoryFeatureLayer[0].ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shipInMemoryFeatureLayer[0].InternalFeatures.Clear();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shipInMemoryFeatureLayer[0].InternalFeatures.Add(new&nbsp;Feature(new&nbsp;PointShape(targetshape\_qala.GetBoundingBox().GetCenterPoint().X,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;targetshape\_qala.GetBoundingBox().GetCenterPoint().Y)));&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cemi.Layers.Add("qalwpfMap1.Overlays.Add("Layerler",&nbsp;staticoverlay);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wpfMap1.Overlays.Add("Layerler",&nbsp;staticoverlay);&nbsp;  
&nbsp;…&nbsp;  
&nbsp;wpfMap1.ZoomLevelSnapping&nbsp;=&nbsp;ZoomLevelSnappingMode.None;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wpfMap1.CurrentExtent&nbsp;=&nbsp;ExtentHelper.GetDrawingExtent(new&nbsp;RectangleShape(400843.093380,&nbsp;4469345.625271,&nbsp;401354.378890,&nbsp;4468739.821959),&nbsp;1166,812);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;my&nbsp;picture&nbsp;1.png&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[boxca.com/85j2o27byg13/1.PNG.html](http://boxca.com/85j2o27byg13/1.PNG.html)&nbsp;  
&nbsp;&nbsp;  
&nbsp;my&nbsp;picture&nbsp;2.png&nbsp;&nbsp;&nbsp;[boxca.com/m0f6mfffnl2s/2.PNG.html](http://boxca.com/m0f6mfffnl2s/2.PNG.html)&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 9, 2010, 9:00pm UTC](https://community.thinkgeo.com/t/png-rendering/328/6 "2010-03-09T21:00:49Z")

</div>

Serxan,

Welcome&nbsp;to&nbsp;MapSuite's&nbsp;world.

I&nbsp;have&nbsp;tried&nbsp;to&nbsp;recreate&nbsp;this&nbsp;issue,&nbsp;but&nbsp;I&nbsp;can&nbsp;not&nbsp;make&nbsp;it.

The&nbsp;attachement&nbsp;is&nbsp;the&nbsp;sample&nbsp;application&nbsp;I&nbsp;create&nbsp;from&nbsp;your&nbsp;code,&nbsp;the&nbsp;original&nbsp;code&nbsp;can&nbsp;not&nbsp;be&nbsp;compiled,&nbsp;so&nbsp;I&nbsp;updated&nbsp;some&nbsp;of&nbsp;them,&nbsp;but&nbsp;I&nbsp;can&nbsp;not&nbsp;run&nbsp;because&nbsp;of&nbsp;lacking&nbsp;some&nbsp;of&nbsp;the&nbsp;necessary&nbsp;code.

Please&nbsp;update&nbsp;the&nbsp;sample&nbsp;application&nbsp;and&nbsp;attached&nbsp;your&nbsp;data&nbsp;if&nbsp;they're&nbsp;needed&nbsp;to&nbsp;make&nbsp;it&nbsp;can&nbsp;recreate&nbsp;your&nbsp;problem.

Thanks

James&nbsp;

[1857-PngTest.zip](https://community.thinkgeo.com/uploads/default/original/2X/a/a88605015c21d648f339d41edb3f6f395ba349d9.zip) (9.81 KB)
