[mapguide-users] MgByteSink ToFile method?
Andy Morsell
amorsell at spatialgis.com
Mon Jan 29 23:09:20 EST 2007
Thanks Steve. I had something wrong with my path and finally got it right.
This works very well - I'm able to write a map created with the rendering
service API directly to the file system. And, the PNG transparency is
preserved which is something the .NET Imaging assembly cannot currently do
if you create a bitmap and write it to the file system.
Thanks again.
Andy
_____
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Steve Dang
Sent: Monday, January 29, 2007 6:48 PM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] MgByteSink ToFile method?
Hi Andy,
Here is some sample code:
MgByteSource byteSource = new MgByteSource("Testing", 7);
byteSource.SetMimeType("text/plain");
MgByteReader byteReader = byteSource.GetReader();
MgByteSink byteSink = new MgByteSink (byteReader);
byteSink.ToFile("C:\\Temp\\data.txt");
Hope this helps.
Steve.
_____
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Andy Morsell
Sent: Monday, January 29, 2007 6:38 PM
To: 'MapGuide Users Mail List'
Subject: [mapguide-users] MgByteSink ToFile method?
How is the MgByteSink::ToFile method succesfully used? When I attempt to
utilize it in a .NET program, I get the following error message no matter
what I use for the path:
A file IO exception occurred: test.pngA file IO exception occurred: test.png
Exception occurred in method MgByteSink.ToFile at line 220 in file
c:\build_tux_area\mgdev\common\service\data\ByteSink.cpp
Thank you.
Andy Morsell, P.E.
Spatial Integrators, Inc.
<http://www.SpatialGIS.com> http://www.SpatialGIS.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070129/cdaafa53/attachment.html
More information about the mapguide-users
mailing list