# Convert Image to GeoImage

**URL:** <https://community.thinkgeo.com/t/convert-image-to-geoimage/2088>\
**Category:** WinForms\
**Created:** [September 10, 2012, 6:35pm UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088 "2012-09-10T18:35:38Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Bob3](https://community.thinkgeo.com/u/Bob3)\
**Post date:** [September 10, 2012, 6:35pm UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/1 "2012-09-10T18:35:38Z")

</div>

I'm&nbsp;trying&nbsp;to&nbsp;use&nbsp;a&nbsp;image&nbsp;resource&nbsp;in&nbsp;my&nbsp;project&nbsp;(global::Marketware.Resource1.Hospital16)&nbsp;as&nbsp;a&nbsp;property&nbsp;for&nbsp;a&nbsp;PointStyle.&nbsp;

I&nbsp;see&nbsp;that&nbsp;PointStyle&nbsp;has&nbsp;a&nbsp;property&nbsp;called&nbsp;Image,&nbsp;but&nbsp;it's&nbsp;expecting&nbsp;a&nbsp;GeoImage,&nbsp;can&nbsp;anyone&nbsp;tell&nbsp;me&nbsp;how&nbsp;to&nbsp;convert&nbsp;this&nbsp;resource&nbsp;into&nbsp;a&nbsp;GeoImage?

Thanks!!&nbsp;&nbsp;Bob

---

<div class="post-metadata">

**Author:** ![Edgar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@Edgar](https://community.thinkgeo.com/u/Edgar)\
**Post date:** [September 11, 2012, 2:20am UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/2 "2012-09-11T02:20:07Z")

</div>

This&nbsp;code&nbsp;will&nbsp;help&nbsp;you&nbsp;Bob,

`MemoryStream stream = new MemoryStream();Marketware.Resource1.Hospital16.Save(stream, ImageFormat.Bmp);GeoImage geoImage = new GeoImage(stream);`

Regards,

Edgar

---

<div class="post-metadata">

**Author:** ![Bob3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Bob3](https://community.thinkgeo.com/u/Bob3)\
**Post date:** [September 11, 2012, 12:02pm UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/3 "2012-09-11T12:02:23Z")

</div>

&nbsp;

Thank&nbsp;you&nbsp;for&nbsp;the&nbsp;code&nbsp;suggestion.&nbsp;Unfortunately&nbsp;I’m&nbsp;still&nbsp;struggling&nbsp;to&nbsp;get&nbsp;these&nbsp;Images&nbsp;to&nbsp;display.&nbsp;Here&nbsp;is&nbsp;the&nbsp;code&nbsp;that&nbsp;builds&nbsp;the&nbsp;hospitalLayer,&nbsp;can&nbsp;you&nbsp;see&nbsp;what&nbsp;might&nbsp;be&nbsp;going&nbsp;wrong?&nbsp;It&nbsp;doesn’t&nbsp;produce&nbsp;an&nbsp;error,&nbsp;but&nbsp;it&nbsp;doesn’t&nbsp;display&nbsp;the&nbsp;image(s)&nbsp;either.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InMemoryFeatureLayer&nbsp;hospitalLayer&nbsp;=&nbsp;new&nbsp;InMemoryFeatureLayer();  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;(DataRow&nbsp;row&nbsp;in&nbsp;Hospitals.Rows)  
&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(Convert.ToDouble(row["longitude"]),&nbsp;Convert.ToDouble(row["latitude"]));  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShapeValidationResult&nbsp;result&nbsp;=&nbsp;point.Validate(ShapeValidationMode.Simple);  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(result.IsValid)  
&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;point.Id&nbsp;=&nbsp;bc.Getkey();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Feature&nbsp;feature&nbsp;=&nbsp;point.GetFeature();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hospitalLayer.InternalFeatures.Add(feature);  
&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;MemoryStream&nbsp;stream&nbsp;=&nbsp;new&nbsp;MemoryStream();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Marketware.Resource1.Hospital16.Save(stream,&nbsp;ImageFormat.Png);&nbsp;//Original&nbsp;Image&nbsp;is&nbsp;PNG  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GeoImage&nbsp;geoImage&nbsp;=&nbsp;new&nbsp;GeoImage(stream);  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PointStyle&nbsp;hStyle&nbsp;=&nbsp;new&nbsp;PointStyle();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hStyle.Image&nbsp;=&nbsp;geoImage;  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hospitalLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(hStyle);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hospitalLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.Layers.Add(hospitalLayer);  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Edgar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@Edgar](https://community.thinkgeo.com/u/Edgar)\
**Post date:** [September 11, 2012, 9:46pm UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/4 "2012-09-11T21:46:13Z")

</div>

Are&nbsp;you&nbsp;using&nbsp;a&nbsp;WorldMapKitLayer?&nbsp;If&nbsp;so&nbsp;,&nbsp;I&nbsp;think&nbsp;your&nbsp;point&nbsp;layer&nbsp;had&nbsp;been&nbsp;covered&nbsp;by&nbsp;it,&nbsp;please&nbsp;try&nbsp;to&nbsp;add&nbsp;the&nbsp;layer&nbsp;to&nbsp;the&nbsp;last.one&nbsp;in&nbsp;the&nbsp;mapPrinterLayer.&nbsp;Here&nbsp;is&nbsp;my&nbsp;map

 ![](https://community.thinkgeo.com/uploads/default/original/2X/9/97d6fd9403af22ca75f922bffdd863f2bf6fc248.PNG)

&nbsp;

---

<div class="post-metadata">

**Author:** ![Bob3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Bob3](https://community.thinkgeo.com/u/Bob3)\
**Post date:** [September 12, 2012, 8:07am UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/5 "2012-09-12T08:07:51Z")

</div>

Yes&nbsp;I'm&nbsp;using&nbsp;the&nbsp;WorldMapKitLayer,&nbsp;but&nbsp;that&nbsp;doesn't&nbsp;seem&nbsp;to&nbsp;be&nbsp;the&nbsp;answer.&nbsp;&nbsp;I&nbsp;removed&nbsp;all&nbsp;layers&nbsp;but&nbsp;the&nbsp;Hospitallayer&nbsp;and&nbsp;I&nbsp;still&nbsp;get&nbsp;nothing&nbsp;on&nbsp;the&nbsp;printpreview&nbsp;map.

Can&nbsp;you&nbsp;see&nbsp;anything&nbsp;else&nbsp;that&nbsp;is&nbsp;missing&nbsp;from&nbsp;the&nbsp;above&nbsp;code?&nbsp;&nbsp;BTW,&nbsp;below&nbsp;is&nbsp;a&nbsp;screenshot&nbsp;of&nbsp;the&nbsp;original&nbsp;map&nbsp;so&nbsp;the&nbsp;Hospital&nbsp;Markers&nbsp;are&nbsp;valid.

 ![](https://community.thinkgeo.com/uploads/default/original/2X/5/57159e08c775b5e457853c6bc29e722c8d27a4dd.png)  
  
bob  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Edgar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@Edgar](https://community.thinkgeo.com/u/Edgar)\
**Post date:** [September 12, 2012, 9:29am UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/6 "2012-09-12T09:29:31Z")

</div>

Can&nbsp;you&nbsp;show&nbsp;me&nbsp;the&nbsp;code&nbsp;which&nbsp;contains&nbsp;adding&nbsp;the&nbsp;WorldMapKitLayer?&nbsp;The&nbsp;sequence&nbsp;might&nbsp;be&nbsp;wrong&nbsp;at&nbsp;this&nbsp;scenario.

---

<div class="post-metadata">

**Author:** ![Bob3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Bob3](https://community.thinkgeo.com/u/Bob3)\
**Post date:** [September 12, 2012, 9:52am UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/7 "2012-09-12T09:52:21Z")

</div>

&nbsp;

Sure&nbsp;here&nbsp;is&nbsp;the&nbsp;entire&nbsp;Method&nbsp;Code&nbsp;(BTW,&nbsp;I’ve&nbsp;just&nbsp;adapted&nbsp;the&nbsp;Sample,&nbsp;so&nbsp;pretty&nbsp;much&nbsp;everything&nbsp;else&nbsp;is&nbsp;the&nbsp;same&nbsp;as&nbsp;the&nbsp;Sample)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;void&nbsp;AddMapLayer()  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Create&nbsp;the&nbsp;MapPrinterLayer&nbsp;and&nbsp;set&nbsp;the&nbsp;position  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MapPrinterLayer&nbsp;mapPrinterLayer&nbsp;=&nbsp;new&nbsp;MapPrinterLayer();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.MapUnit&nbsp;=&nbsp;GeographyUnit.DecimalDegree;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.BackgroundMask&nbsp;=&nbsp;new&nbsp;AreaStyle(new&nbsp;GeoPen(GeoColor.StandardColors.Black,&nbsp;1));  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.Open();  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Set&nbsp;the&nbsp;maps&nbsp;position&nbsp;slightly&nbsp;below&nbsp;the&nbsp;pages&nbsp;center&nbsp;and&nbsp;8&nbsp;inches&nbsp;wide&nbsp;and&nbsp;7&nbsp;inches&nbsp;tall  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RectangleShape&nbsp;pageBoundingbox&nbsp;=&nbsp;GetPageBoundingBox(PrintingUnit.Inch);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.SetPosition(8,&nbsp;10,&nbsp;pageBoundingbox.GetCenterPoint().X,&nbsp;pageBoundingbox.GetCenterPoint().Y&nbsp;+&nbsp;1,&nbsp;PrintingUnit.Inch);  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Setup&nbsp;the&nbsp;intial&nbsp;extent&nbsp;and&nbsp;ensure&nbsp;they&nbsp;snap&nbsp;to&nbsp;the&nbsp;default&nbsp;ZoomLevel  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ZoomLevelSet&nbsp;zoomLevelSet&nbsp;=&nbsp;new&nbsp;ZoomLevelSet();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.MapExtent&nbsp;=&nbsp;ExtentHelper.ZoomToScale(zoomLevelSet.ZoomLevel03.Scale,&nbsp;CurrentExtent,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.MapUnit,&nbsp;(float)mapPrinterLayer.GetBoundingBox().Width,&nbsp;(float)mapPrinterLayer.GetBoundingBox().Height);  
&nbsp;  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Add&nbsp;the&nbsp;World&nbsp;Map&nbsp;Kit&nbsp;layer&nbsp;as&nbsp;the&nbsp;background  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WorldMapKitLayer&nbsp;worldMapKitLayer&nbsp;=&nbsp;new&nbsp;WorldMapKitLayer();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;worldMapKitLayer.Projection&nbsp;=&nbsp;WorldMapKitProjection.DecimalDegrees;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.Layers.Add(worldMapKitLayer);  
&nbsp;  
&nbsp;  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(Physicians&nbsp;!=&nbsp;null)&nbsp;//Physicians&nbsp;DataTable  
&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;InMemoryFeatureLayer&nbsp;physicianLayer&nbsp;=&nbsp;new&nbsp;InMemoryFeatureLayer();  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;(DataRow&nbsp;row&nbsp;in&nbsp;Physicians.Rows)  
&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(Convert.ToDouble(row["longitude"]),&nbsp;Convert.ToDouble(row["latitude"]));  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShapeValidationResult&nbsp;result&nbsp;=&nbsp;point.Validate(ShapeValidationMode.Simple);  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(result.IsValid)  
&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;point.Id&nbsp;=&nbsp;bc.Getkey();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Feature&nbsp;feature&nbsp;=&nbsp;point.GetFeature();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;physicianLayer.InternalFeatures.Add(feature);  
&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;MemoryStream&nbsp;stream&nbsp;=&nbsp;new&nbsp;MemoryStream();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Marketware.Resource1.doctor16.Save(stream,&nbsp;ImageFormat.Png);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GeoImage&nbsp;geoImage&nbsp;=&nbsp;new&nbsp;GeoImage(stream);  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PointStyle&nbsp;hStyle&nbsp;=&nbsp;new&nbsp;PointStyle();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hStyle.Image&nbsp;=&nbsp;geoImage;  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;physicianLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(hStyle);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.Layers.Add(physicianLayer);  
&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;if&nbsp;(Hospitals&nbsp;!=&nbsp;null)&nbsp;//Hospitals&nbsp;DataTable  
&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;InMemoryFeatureLayer&nbsp;hospitalLayer&nbsp;=&nbsp;new&nbsp;InMemoryFeatureLayer();  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;(DataRow&nbsp;row&nbsp;in&nbsp;Hospitals.Rows)  
&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(Convert.ToDouble(row["longitude"]),&nbsp;Convert.ToDouble(row["latitude"]));  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShapeValidationResult&nbsp;result&nbsp;=&nbsp;point.Validate(ShapeValidationMode.Simple);  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(result.IsValid)  
&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;point.Id&nbsp;=&nbsp;bc.Getkey();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Feature&nbsp;feature&nbsp;=&nbsp;point.GetFeature();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hospitalLayer.InternalFeatures.Add(feature);  
&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;MemoryStream&nbsp;stream&nbsp;=&nbsp;new&nbsp;MemoryStream();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Marketware.Resource1.Hospital16.Save(stream,&nbsp;ImageFormat.Png);&nbsp;//Original&nbsp;Image&nbsp;is&nbsp;PNG  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GeoImage&nbsp;geoImage&nbsp;=&nbsp;new&nbsp;GeoImage(stream);  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PointStyle&nbsp;hStyle&nbsp;=&nbsp;new&nbsp;PointStyle();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hStyle.Image&nbsp;=&nbsp;geoImage;  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hospitalLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(hStyle);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hospitalLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.Layers.Add(hospitalLayer);  
&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;//Now&nbsp;Add&nbsp;our&nbsp;Detail&nbsp;(Polygon)&nbsp;Layer  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(DetailLayer&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;mapPrinterLayer.Layers.Add(DetailLayer);  
&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;Add&nbsp;the&nbsp;MapPrinterLayer&nbsp;to&nbsp;the&nbsp;PrinterInteractiveOverlay  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapPrinterLayer.MapExtent&nbsp;=&nbsp;CurrentExtent;&nbsp;//The&nbsp;original&nbsp;Extent&nbsp;of&nbsp;the&nbsp;MapControl&nbsp;before&nbsp;the&nbsp;PrintPreview&nbsp;window&nbsp;is&nbsp;called;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PrinterInteractiveOverLay&nbsp;printerInteractiveOverLay&nbsp;=&nbsp;(PrinterInteractiveOverLay)MapControl.InteractiveOverlays["PrintPreviewOverlay"];  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printerInteractiveOverLay.PrinterLayers.Add("MapLayer",&nbsp;mapPrinterLayer);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Edgar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@Edgar](https://community.thinkgeo.com/u/Edgar)\
**Post date:** [September 13, 2012, 12:21am UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/8 "2012-09-13T00:21:08Z")

</div>

Oh&nbsp;I&nbsp;find&nbsp;the&nbsp;problem,&nbsp;the&nbsp;difference&nbsp;between&nbsp;your&nbsp;code&nbsp;and&nbsp;mine&nbsp;is&nbsp;the&nbsp;PointStyle’s&nbsp;initialization.&nbsp;You&nbsp;used&nbsp;the&nbsp;Non-parameters&nbsp;constructor,&nbsp;and&nbsp;after&nbsp;you&nbsp;set&nbsp;the&nbsp;image,&nbsp;the&nbsp;PointType&nbsp;should&nbsp;also&nbsp;be&nbsp;set,&nbsp;so&nbsp;please&nbsp;change&nbsp;your&nbsp;code&nbsp;to&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;PointStyle&nbsp;style&nbsp;=&nbsp;new&nbsp;PointStyle();&nbsp;  
&nbsp;style.Image&nbsp;=&nbsp;geoImage;&nbsp;  
&nbsp;style.PointType&nbsp;=&nbsp;PointType.Bitmap;&nbsp;  
&nbsp;&nbsp;  
&nbsp;and&nbsp;every&nbsp;will&nbsp;be&nbsp;Ok.&nbsp;BTW,&nbsp;you&nbsp;can&nbsp;also&nbsp;use&nbsp;this&nbsp;one&nbsp;&nbsp;PointStyle&nbsp;style&nbsp;=&nbsp;new&nbsp;PointStyle(geoImage);&nbsp;to&nbsp;make&nbsp;it&nbsp;work.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Hope&nbsp;it&nbsp;helps.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Edgar

---

<div class="post-metadata">

**Author:** ![Bob3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Bob3](https://community.thinkgeo.com/u/Bob3)\
**Post date:** [September 13, 2012, 11:11am UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/9 "2012-09-13T11:11:32Z")

</div>

THANK&nbsp;YOU&nbsp;VERY&nbsp;MUCH!!&nbsp;&nbsp;That&nbsp;did&nbsp;the&nbsp;trick.&nbsp;  
&nbsp;&nbsp;  
&nbsp;bob

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [September 13, 2012, 5:49pm UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/10 "2012-09-13T17:49:47Z")

</div>

Hello&nbsp;Bob,&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;are&nbsp;welcome,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know&nbsp;your&nbsp;problem.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![arron](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/87869e/32.png) [@arron](https://community.thinkgeo.com/u/arron)\
**Post date:** [August 15, 2013, 9:12pm UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/11 "2013-08-15T21:12:32Z")

</div>

Hi,&nbsp;the&nbsp;guys&nbsp;are&nbsp;so&nbsp;nice&nbsp;here.&nbsp;I&nbsp;am&nbsp;a&nbsp;newbie.&nbsp;But&nbsp;I&nbsp;have&nbsp;to&nbsp;admit&nbsp;that&nbsp;using&nbsp;a&nbsp;3rd&nbsp;party&nbsp;tool&nbsp;whose&nbsp;way&nbsp;of&nbsp;processing&nbsp;is&nbsp;simple&nbsp;and&nbsp;fast&nbsp;can&nbsp;save&nbsp;a&nbsp;lot&nbsp;of&nbsp;time&nbsp;for&nbsp;us.&nbsp;I&nbsp;am&nbsp;almost&nbsp;a&nbsp;totally&nbsp;green&nbsp;hand&nbsp;on&nbsp;image&nbsp;converting&nbsp;work.&nbsp;I&nbsp;have&nbsp;only&nbsp;tried&nbsp;the&nbsp;&nbsp;the&nbsp;free&nbsp;trial&nbsp;package&nbsp;of&nbsp;[an&nbsp;image&nbsp;and&nbsp;document&nbsp;conversion&nbsp;tool](http://www.yiigo.com/net-document-image-sdk/conversion-support.shtml)&nbsp;to&nbsp;convert&nbsp;images&nbsp;and&nbsp;do&nbsp;each&nbsp;step&nbsp;according&nbsp;to&nbsp;its&nbsp;tutorials&nbsp;about&nbsp;[how&nbsp;to&nbsp;convert&nbsp;document&nbsp;image](http://www.yiigo.com/guides/csharp/how-to-convert.shtml)&nbsp;using&nbsp;C#.NET.&nbsp;It&nbsp;is&nbsp;just&nbsp;one&nbsp;of&nbsp;many&nbsp;but&nbsp;I&nbsp;do&nbsp;appreciate&nbsp;it&nbsp;because&nbsp;it&nbsp;is&nbsp;totally&nbsp;manual.&nbsp;Even&nbsp;though&nbsp;I&nbsp;only&nbsp;tried&nbsp;its&nbsp;free&nbsp;trial&nbsp;package&nbsp;and&nbsp;didn′t&nbsp;check&nbsp;the&nbsp;cost&nbsp;and&nbsp;licensing&nbsp;conditions,&nbsp;it&nbsp;worked&nbsp;great&nbsp;for&nbsp;me.&nbsp;But&nbsp;now&nbsp;I&nbsp;want&nbsp;to&nbsp;find&nbsp;more&nbsp;information&nbsp;about&nbsp;the&nbsp;image&nbsp;conversion&nbsp;work.&nbsp;Using&nbsp;code&nbsp;to&nbsp;do&nbsp;with&nbsp;the&nbsp;problem&nbsp;is&nbsp;too&nbsp;complicated&nbsp;for&nbsp;me,&nbsp;but&nbsp;I&nbsp;will&nbsp;try&nbsp;my&nbsp;best.&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;nice&nbsp;information.  
  
  
  
  
  
  
  
Best&nbsp;regards,  
  
Arron

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [August 18, 2013, 9:18pm UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/12 "2013-08-18T21:18:54Z")

</div>

Hi&nbsp;Arron,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;sharing,&nbsp;and&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer

---

<div class="post-metadata">

**Author:** ![fdsgdfg](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/f/f08c70/32.png) [@fdsgdfg](https://community.thinkgeo.com/u/fdsgdfg)\
**Post date:** [August 29, 2013, 9:29pm UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/13 "2013-08-29T21:29:07Z")

</div>

hello,&nbsp;i&nbsp;have&nbsp;an&nbsp;[image&nbsp;converter&nbsp;c#](http://www.rasteredge.com/how-to/csharp-imaging/image-converting/)&nbsp;downloaded&nbsp;yesterday,i&nbsp;can&nbsp;convert&nbsp;to&nbsp;various&nbsp;other&nbsp;formats,&nbsp;but&nbsp;i&nbsp;don’t&nbsp;know&nbsp;whether&nbsp;it&nbsp;is&nbsp;the&nbsp;source&nbsp;code&nbsp;i&nbsp;am&nbsp;needing&nbsp;to&nbsp;convert&nbsp;to&nbsp;GeImage.&nbsp;can&nbsp;any&nbsp;check&nbsp;this&nbsp;[online&nbsp;image&nbsp;sdk](http://www.rasteredge.com/dotnet-imaging/)&nbsp;for&nbsp;me.&nbsp;any&nbsp;help&nbsp;would&nbsp;be&nbsp;appreciated.

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [September 2, 2013, 3:45am UTC](https://community.thinkgeo.com/t/convert-image-to-geoimage/2088/14 "2013-09-02T03:45:02Z")

</div>

Hi&nbsp;fdsgdfg,&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;what&nbsp;I&nbsp;guess&nbsp;is&nbsp;correct,&nbsp;you&nbsp;want&nbsp;to&nbsp;get&nbsp;a&nbsp;GeoImage&nbsp;with&nbsp;the&nbsp;image&nbsp;converter&nbsp;tool?&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;yes,&nbsp;I&nbsp;noticed&nbsp;it&nbsp;provide&nbsp;a&nbsp;way&nbsp;to&nbsp;convert&nbsp;an&nbsp;image&nbsp;to&nbsp;stream&nbsp;which&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;generate&nbsp;a&nbsp;Geoimage&nbsp;in&nbsp;MapSuite,&nbsp;like&nbsp;the&nbsp;below:&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string&nbsp;fileName&nbsp;=&nbsp;"c:/Sample.png";&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REImage&nbsp;reImage&nbsp;=&nbsp;REFile.OpenImageFile(fileName);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MemoryStream&nbsp;ms&nbsp;=&nbsp;REFile.GetStreamFromImage(reImage,&nbsp;new&nbsp;PNGEncoder());&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GeoImage&nbsp;makrerImage&nbsp;=&nbsp;new&nbsp;GeoImage(ms);&nbsp;  
&nbsp;Or,&nbsp;if&nbsp;I&nbsp;misunderstand&nbsp;what&nbsp;your&nbsp;question,&nbsp;please&nbsp;correct&nbsp;me.&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer
