|
|
Comments and Discussions
|
|
 |

|
I am writing a .Net application which runs on windows mobile 6 (PDAs) having 128 mb RAM. The application needs to resize jpeg images (of size >= 4 mb) to thumbnails for further processing. The application just throws outofmemory exception as soon as I try to create a Bitmap of the original image. Is there any method to resize image on windows mobile platform? Any help will be appreciated?
Mayur
|
|
|
|

|
Your example has been very useful for me. Thank you for your time and your effort.
|
|
|
|

|
Hi
I am trying to capture the screen of a particular application and send it to another custom made window.
How do I do this?
Possibe solutions could be....
1. hooking all GDI API using Detours, this process would be quite tedious....and I am getting scared looking at the sheer number of APIs I may have to hook
2. There is a CopyRect function from x1,y1 to x2,y2 that I could use...but this isnt solving much...cuz If i minimize the application window the other custom made window just shows the image within the co-ordinates (x1,y1 and x2,y2) of the screen....
Is there any other way this could be done?
I was reading about WM_PAINT....i dunno if this could lead anywhere....
Thanks In advance!
|
|
|
|

|
Sometimes you find an article that tells you exactly what you need to get past a hurdle and get on your way. This was exactly what I needed. Good job.
|
|
|
|

|
Hi,
I am in dire need of the below mentioned files and could not find a download for the Platform SDK which supports VC++6. If possible, could you please send me the files at bikash.rai[@]gmail.com. I would remain forever grateful.
the dll : gdiplus.dll
the library : gdiplus.lib
the header files : gdiplus*.h
the help files: gdicpp.chm & gdicpp.chi
Thank you.
---
![Beer | [beer]](/script/Forums/Images/beer.gif) Hakuna-Matata
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|

|
Hi,
I'm starting to work with GDI+ and I tried to draw a 100x100 millimeters square with this code:
graphics.SetPageUnit(UnitMillimeter);
Pen bluePen(Color(255, 0, 0, 255), 0.0f);
graphics.DrawRectangle(&bluePen, 1.0f, 1.0f, 100.0f, 100.0f);
To my surprise, the size of the square on the screen is 106x106 millimeters.
SetPageUnit shouldn’t take care about converting world to page to device conversions?
How can I get the correct size on my screen?
Thanks!
|
|
|
|
|

|
I want to create some clases
ssss
|
|
|
|

|
OK, is this a general programming question, or a question about the article ? I don't even understand the question. you want to know how to create a class ? Surely not ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|

|
am using GDI+ for bitmap image compression .
I have used this code. but when i complie it...error occurs as follow
gdiplus.lib(imagingguds.obj) : fatal error LNK1103: debugging information corrupt; recompile module
I am getting the reason since i am new to GDI+
Please help me
|
|
|
|

|
Looks like your lib file is corrupt, I'd download it again.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|

|
i have a problem with GDI+.
who can explain to me ,please?
Why did VC++ say that "Graphics" Class undefine,although i added GDI+ into VC Librabry and included Gdiplus header file?
|
|
|
|

|
I suspect because you're not using the GDIPlus namespace.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|

|
I'm using Visual C++ 6.0
I have Downloaded and installed the Platform SDK Redistributable: GDI+ (File Name: gdiplus_dnld.exe Version: 3102.1360 ) to the computer.But I cannot compile GDI+ included project that have given in this article.It says that no such directory or file.The error code is given below.
Compiling resources...
Compiling...
StdAfx.cpp
d:\_thisara\gdi_c++\gdi++\stdafx.h(22) : fatal error C1083: Cannot open include file: 'gdiplus.h': No such file or directory
Error executing cl.exe.
Please tell me what else I have to do inorder to proceed with GDI+
Thanks
Thisara
ENTC
UoM
|
|
|
|

|
How old is the PSDK you are using ? The PSDK has not worked with VC6 ( which is 3 versions old and no longer supported ) for some time. Probably this is the reason you're getting this error.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|

|
Dear Christian,
Thank you for taking time to look into my matter.
The PSDK im using is Windows SDK - Windows Server 2003.I have installed all the components availble there(Core SDK ,Internet Development SDK, IIS SDK, MDAC SDK, Windows Installer SDK, WMI SDK ,Windows Media Services SDK).
Anyway,Little while ago, I gave the directories of include files and Lib files (Tools >> Options >> Directories).Before that when the first error message came(in original question) I have not given the directories.
Now... there were 16 errors which are shown below. I cannot resolve them.most of them are errors of "gdiplusinit.h" which is given by the SDK.pls tell me what's wrong here..
--------------------Configuration: Starting GDIPlus - Win32 Debug--------------------
Compiling...
StdAfx.cpp
f:\program files_2\microsoft sdk\include\gdiplusinit.h(32) : error C2065: 'ULONG_PTR' : undeclared identifier
f:\program files_2\microsoft sdk\include\gdiplusinit.h(32) : error C2065: 'token' : undeclared identifier
f:\program files_2\microsoft sdk\include\gdiplusinit.h(32) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\program files_2\microsoft sdk\include\gdiplusinit.h(32) : error C2071: 'NotificationHookProc' : illegal storage class
f:\program files_2\microsoft sdk\include\gdiplusinit.h(33) : error C2146: syntax error : missing ')' before identifier 'token'
f:\program files_2\microsoft sdk\include\gdiplusinit.h(33) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\program files_2\microsoft sdk\include\gdiplusinit.h(33) : error C2071: 'NotificationUnhookProc' : illegal storage class
f:\program files_2\microsoft sdk\include\gdiplusinit.h(33) : error C2059: syntax error : ')'
f:\program files_2\microsoft sdk\include\gdiplusinit.h(86) : error C2059: syntax error : 'const'
f:\program files_2\microsoft sdk\include\gdiplusinit.h(95) : error C2146: syntax error : missing ')' before identifier 'token'
f:\program files_2\microsoft sdk\include\gdiplusinit.h(95) : warning C4229: anachronism used : modifiers on data are ignored
f:\program files_2\microsoft sdk\include\gdiplusinit.h(95) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
f:\program files_2\microsoft sdk\include\gdiplusinit.h(95) : error C2059: syntax error : ')'
f:\program files_2\microsoft sdk\include\gdiplusflat.h(2639) : warning C4229: anachronism used : modifiers on data are ignored
f:\program files_2\microsoft sdk\include\gdiplusflat.h(2639) : error C2440: 'initializing' : cannot convert from 'int' to 'enum Gdiplus::Status'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
f:\program files_2\microsoft sdk\include\gdiplusflat.h(2644) : error C2146: syntax error : missing ')' before identifier 'token'
f:\program files_2\microsoft sdk\include\gdiplusflat.h(2644) : warning C4229: anachronism used : modifiers on data are ignored
f:\program files_2\microsoft sdk\include\gdiplusflat.h(2644) : error C2182: 'GdiplusNotificationUnhook' : illegal use of type 'void'
f:\program files_2\microsoft sdk\include\gdiplusflat.h(2644) : error C2059: syntax error : ')'
Error executing cl.exe.
Starting GDIPlus.exe - 16 error(s), 3 warning(s)
Regards
Dhananjaya
ENTC
UoM
|
|
|
|

|
Dear Christian,
Now the problem is OK..
I inserted following code in StdAfx.h just above #include "gdiplus.h" as sugested in a earlier thread.Now all the things are OK.
#ifndef ULONG_PTR
#define ULONG_PTR unsigned long*
#endif
Thanks
ENTC
UoM
|
|
|
|

|
Looks like that #define is what's needed to make the newer SDK work with VC6 then. Either way, VC6 is unsupported ( and also really bad ). You should really consider a move to VS.NET - surely VS2002 would be fairly cheap to buy on ebay or something.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|

|
I VC6
|
|
|
|

|
Hi..
Please tell me a way to insert/add a GIF image in VC++ 6.0. And also I want to change the image's position (In XY Coordinates) and to rotate the Image in specified angles.
I need someones help in the above matter...
Can I use GDI+ in Visual Studio 6.0 Programming(VC++)? I don't know much details about GDI+.
Thanks
Dhananjaya
ENTC
UoM
|
|
|
|

|
You can use GDI+ with VC6, but you need to get ahold of an older PSDK in order to do so.
I have an article on CP on rotating images with GDI+. As you're drawing the image, the position of the image is entirely up to you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|

|
Hi,
I was able to start working with GDI+ in VC++ 6.0 after the discussion with you. I tried to insert a image to my main frame using "Image" in GDI+. But a runtime error (unhandled exception) is occuring when im going to run the program.The details are as follows.
I have included "gdiplus.h" in StdAfx.h. There were no issue on that.But the problem started when i tried to insert a image using the guidelines given in following msdn link(.Drawing, Positioning, and Cloning Images - GDI+)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/AboutGDIPlus/IntroductiontoGDIPlus/OverviewofGDIPlus.asp
As per that methode I used the following code:
CPaintDC dc(this);
Graphics myGraphics(dc.m_hDC);
Image myImage(L"robot.gif"); // this line creates the problem
myGraphics.DrawImage(&myImage, 20, 10);
The program Built & compiled successfully.But didn't run.It gaves a error.
When I insert that code to a .NET project the error message says that ;"Unhandled exception at 0x7c9105f8 in tttdk.exe: 0xC0000005: Access violation reading location 0x00000010."
When I break it , it shows the location of the error in the following cpp file.
D:\VS\VC\atlmfc\src\atl\atls\allocate.cpp
..
...
CAtlTraceCategory *CAtlAllocator::GetCategory(int iCategory) const
{
if(iCategory == m_pProcess->CategoryCount())
return NULL;
ATLASSERT((iCategory < m_pProcess->CategoryCount()) || (iCategory == -1));
CAtlTraceCategory *pCategory = NULL;
if(iCategory >= 0)
{
BYTE *pb = reinterpret_cast(m_pProcess) + m_pProcess->MaxSize(); // this is the location of the error
pCategory = reinterpret_cast(pb) - iCategory - 1;
}
return pCategory;
}
.....
.........
Please help me regarding the above matter ASAP.My intention was to make a Image object and manupulate its posision and orientation.
Thisara
-- modified at 10:11 Monday 14th August, 2006
ENTC
UoM
|
|
|
|

|
The big question would be, can you do *anything* with GDI+ ? Because, you're using an unsupported SDK, it's entirely possible that it's all linking, but it's still never going to work. The code looks fine, so I'd imagine the best remedy would be to get a decent ( up to date and supported ) compiler, unless you can get a really old PSDK so you can work with VC6.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|

|
My project is almost same with yours,but nothing appear on the dialog face at the beginning,seveal seconds later,OK and CANCEL buttons turn up.what's the problem?
Every body could do anything they want, unless fools.
|
|
|
|

|
I guess you need to look at ( and possibly post ) the bits that are different.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|

|
Seems you forgot to Initialize GDI Plus
Christain has written this code in the App class. please check it
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
Gdiplus::GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL);
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|

|
hello
I'm using cximage and dcmtk in a convert app and some errors in cximage take me to gdiplus.h(one thing take you to other)
but get this errors iqual that when compile your app in code project, I'll appreciate your help. thanks
Compiling...
StdAfx.cpp
c:\dicom\gdi++files\gdiplusinit.h(32) : error C2065: 'ULONG_PTR' : undeclared identifier
c:\dicom\gdi++files\gdiplusinit.h(32) : error C2065: 'token' : undeclared identifier
c:\dicom\gdi++files\gdiplusinit.h(32) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\dicom\gdi++files\gdiplusinit.h(32) : error C2071: 'NotificationHookProc' : illegal storage class
c:\dicom\gdi++files\gdiplusinit.h(33) : error C2146: syntax error : missing ')' before identifier 'token'
c:\dicom\gdi++files\gdiplusinit.h(33) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\dicom\gdi++files\gdiplusinit.h(33) : error C2071: 'NotificationUnhookProc' : illegal storage class
c:\dicom\gdi++files\gdiplusinit.h(33) : error C2059: syntax error : ')'
c:\dicom\gdi++files\gdiplusinit.h(86) : error C2059: syntax error : 'const'
c:\dicom\gdi++files\gdiplusinit.h(95) : error C2146: syntax error : missing ')' before identifier 'token'
c:\dicom\gdi++files\gdiplusinit.h(95) : warning C4229: anachronism used : modifiers on data are ignored
c:\dicom\gdi++files\gdiplusinit.h(95) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
c:\dicom\gdi++files\gdiplusinit.h(95) : error C2059: syntax error : ')'
Error executing cl.exe.
convertfromdcm.exe - 12 error(s), 1 warning(s)
|
|
|
|

|
You probably don't have a recent platform SDK installed, and you're probaby using VC6.0. If this is the case, download and install the latest platform SDK.
Christian Graus - Microsoft MVP - C++
|
|
|
|

|
have this a try:
add these code into "stdafx.h".
#ifndef ULONG_PTR
#define ULONG_PTR unsigned long*
#endif
Every body could do anything they want, unless fools.
|
|
|
|

|
thanks a lot ... your hint worked....
ENTC
UoM
|
|
|
|

|
Dear Christian,
unfortunately, after sucessfully starting using GDI+ thanks
to you in 2003 using Visual C++ 6.0, now I'm not able anymore to compile
anything (not even your example), and I fear because of some service pack
installed in the meantime...
I tried to uninstall all platform SDKs and reinstall the February 2003
Edition one (it says on the Microsoft pages that this is the last one
supporting VC++6.0), but with no success (even after having to order the CD
from Microsoft, since the download is not supported anymore)...
On a machine where no SDK at all had ever been installed also no success
after installing the February 2003 Edition, and I fear to make it even more complicate if I try also with the SDK you suggest. Any clue?
Shall I really swith to a more recent Visual Studio version?
Thanks a lot in advance!
Regards,
Paolo Pasquali
|
|
|
|

|
There are a million reasons why you should dump VC6. Standards conformance would be the main one. Having said that, I'm stuck in a VC6 project at the moment, and I just downloaded and installed the latest SDK, no problems that I can see. Microsoft not offering support does not mean it won't work.
Christian Graus - Microsoft MVP - C++
|
|
|
|

|
Thanks a lot!
Btw: I finally succeeded in compiling, but only by explicitely type-defining myself the ULONG_PTR type...
|
|
|
|

|
Actually I've run in to many problems trying to use the "Windows2003" PSDK (the latest and greatest) on VC6. There is some difference in linker output that makes VC6 compiled binaries unable to link with the latest PSDK .libs. I haven't been able to find any leads on resolving the problem, but circa-2003 (not windows2003) PSDKs still seem to work fine, and the latest SDK additions have been frills I can do without. This is a case where lack of MS support [b]DOES[/b] suck
I'm in the same boat as you - can't switch to VC7 because the big boss won't "fix what ain't broke".
|
|
|
|

|
armentage wrote:
Actually I've run in to many problems trying to use the "Windows2003" PSDK (the latest and greatest) on VC6.
That's because the last SDK to support VC6 was Feb 2003.
armentage wrote:
This is a case where lack of MS support [b]DOES[/b] suck
Why would they keep supporting a compiler they don't sell anymore, and that frankly, is crap ?
armentage wrote:
I'm in the same boat as you - can't switch to VC7 because the big boss won't "fix what ain't broke".
Actually, I am using VC2005 most of the time, VS.NET2003 for most of the rest, and VC6 for one project, which I am about to convert to VC2005. Your boss is wrong, it IS broke, it's limiting what you can do, all the more because the C++ implimentation you have is crap. The longer you use it, the greater the cost of moving your code base to real C++.
Christian Graus - Microsoft MVP - C++
|
|
|
|

|
Can you point out any specific grievances with VC6? What makes it "Crap" C++?
|
|
|
|

|
Terrible STL implimentation. No Koenig lookup. Many, many other places where it deviates from the standard. One example off the top of my head for (int i =0; i < 10; ++i) { // do something } for (int i =0; i < 12; ++i) { // do something else } This is valid C++, but VC6 won't compile it. Another: std::vector<int>::iterator it = myVec.begin(); while(it != myVec.end()) { int * i = it; // This is not valid C++, but VC6 allows it. ++it; } The list goes on and on. If you read CUJ, they have a column on ways compilers deviate from the standard, in the VC6 days, every month they found 2-3 problems. VC7 on the other hand is astounding in the leap they took from non-C++ to standards conformance, and it just keeps getting better. Christian Graus - Microsoft MVP - C++
|
|
|
|

|
I found that life is much better if you install an older SDK and put it first in your paths in VC6 and then install the February Platform 2003 SDK in a different directory and place it's paths after the first one. I use the SDK that comes on the samples disk in the book...
Programming Server-Side Applications for Microsoft® Windows® 2000
by Jason Clark and Jeffrey Richter
I have tried just putting the February 2003 SDK on new machines without the other one installed and nothing seems to work right in VC6. However, the older SDK does not have GDI+ so I've been forced to limp along this way for a while.
Good luck
|
|
|
|

|
The strings align perfectly with the bounding rectangles using MM_ISOTROPIC scaling when using something like...
graphics.SetTextRenderingHint(TextRenderingHintAntiAlias);
look out Adobe!
The fonts just had a mind of their own on the screen with GDI.
(Before someone crucifies me...yes, there was a constant from WinNT on up for LOGFONT
lf.lfQuality=ANTIALIASED_QUALITY|PROOF_QUALITY;
that seemed to antialias fine but it did not align correctly with the bounding rectangle... or any rectangle, line, circle for that matter... when scaling using MM_ISOTROPIC)
Performance suffers a bit but you can't argue with the accuracy. This is a godsend from Microsoft.
Thanks for your posting on how to make it a reality for those of us still scratching our heads about whether to embrace the .NET stuff. This will give me something to play with while I suffer the agony of playing with the Visual Studio 2005 Beta 2. (Where oh where has my VC++ 6.0 gone?) (But for GDI...good riddens!)
|
|
|
|

|
Dear Chris,
All your article in GDI+ are outstanding. Really i got interested in doing something in GDI+. You have such a massive potential in GDI. i mean, its is real blessing for you. Actually i have a doubt on GDI. and infact i don't have your mail id to ask directly. That's why i am just using a thred to reach you.
We have a project like Microsoft project Planner ( MS project). our project also a client server project.
name of o ur project is 'Planner'. So name itself describes that it is something to do with visualization. Really it is for data visualization.
To be conzise, we have a list of records in database and in planner we are drwaing some shapes using that data. So our entire interface will look like microsoft project planner.
i am doing lot of custom painting and exploiting lot GDI classes to visualize the data. Now we have a requiremt to make this windows application as a web based peoject. Here also i need to visualize data. I mean i need to draw shaped based on records avilable.
tell me chris,
What is the fecibility of the project.
If i want to go ahead with this project, what i need do ? where i will get some help ? Is there any way to get Image files from data ?
your comment is most appriciable.
Sreejith Nair
[ My Articles ]
|
|
|
|

|
The only issue with a web based project is to remeber the seperation between client and server. So long as your image files are on the server end, or can be uploaded, there's no reason you can't process/create/display images with GDI+ just as you would with a WinForms app.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|

|
This is clear. But Chris, if we have images in server then we can easily send that image to clients side. right. If so, i can create images and send it to sever. But my main issues is 'how will i create an image from a collection of data. Please direct me some helpful urls or any documentations.
Sreejith Nair
[ My Articles ]
|
|
|
|

|
sreejith ss nair wrote:
if we have images in server then we can easily send that image to clients side
correct
sreejith ss nair wrote:
But my main issues is 'how will i create an image from a collection of data.
I'm not sure how this changes because you've gone to a web based system. Don't you have this code already ? And either way, what you're asking is not clear. What sort of image do you want ? That is, what do you want to put on it ? What you want to do is use the API calls that draw boxes/text/shapes/etc, in such a way that they represent your data.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|

|
Dear Christian,
Now i have a winform which will create few custom movable label on my application. And my winform have a panel control (panel paint method overrided). I am dragging and drouping the above custom controls into my panel. To be simple, my project is like microsoft project 2000.
Now i would like to get the screen shot of this form (only the panel area). so one solution for this issue is keep some screen shot when user runns winform and serve that image when user get into web application.
Sreejith Nair
[ My Articles ]
|
|
|
|

|
OK - the labels were written by you, so their onpaint methods will contain the code you need to build your bitmaps
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|

|
Yes Chris, But the issue is , the location of the lable will be changing everytime on each user updation. so if somebody want to see the panel on web, it will show only the last image which takes from that winform. But it may or maynot be the latest updated one. That's why i thought of creating the images directly from database.
And now i am not sure how will i do this in web.
Sreejith Nair
[ My Articles ]
|
|
|
|

|
sreejith ss nair wrote:
it will show only the last image which takes from that winform.
I'm saying don't bother with trying to catch things off a form, that's a hack. Your controls already have the code you need to paint your images, you can't stop the problem that your controls will look the same until a postback. So, generate them on the fly each time, using the data and state of your web app, and the painting code from your controls. The only issue is time and size of images going back and forth.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|

|
Chris, sorry to disturb you again. This is my first web application. So i am not sure about the page state changes and related handling methods. Chris, can you give me an over all picture (skeleton) of my web application. ie, where i will start and which are the interfaces or controls(i am using panel in windows) are best to hold custom painted controls in web application.
And to get on fly data, what method of postback i need to follow..
Sreejith Nair
[ My Articles ]
|
|
|
|

|
What do you mean by 'on the fly data' ? To show images, you need to store them on disc on your server, then create an img tag in your page that points to the image. If you're creating them for temporary use, you probably need to use guids or something for names, and store the names for deletion in a cleanup stage ( given that you can't guarentee postback ).
Basically, a web page exists as an immutable entity - it goes out, and that's it. When the user interacts with the page, you'll get a postback, and a chance to change the page before it goes out again.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|

|
Christian Graus wrote:
To show images, you need to store them on disc on your server, then create an img tag in your page that points to the image
Actually you don't have to store the pictures on disc (but makes it a lot easier).
Solution 1 (which is not an answer to Christian Graus but to the threadcreator).
Give every picture a unique name as they are and set the img tag to that image. Either delete the file after it has been retrived by the client or for example delete all pictures more tha 1 day.
Solution 2.
Don't create a image on the disk. Instead write a unique id in the img tag src="GetImage.aspx?ImageId=qwerty123456" and in the call to GetImage.aspx create the image and send it back in the response as a bytearray. This obvioly means you have to store the data needed to create the picture somewhere.
Sorry for the .Net aspx code, but merly an example on how to do it.
//FM = an object that handles files (stored on disc or in memory), can also be used to create objects
FM.CreatePicture(params);
context.Response.Clear();
context.Response.ClearHeaders();
context.Response.ContentType = "application/unknown";
context.Response.AddHeader("Content-Disposition", "attachment; filename="+ context.Server.UrlEncode(FM.FileName));
context.Response.BinaryWrite( FM.FileContent ); //FM.FileContent = byte[]
FM has to be created but not stored
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
Getting started with the new Microsoft Graphics Libraries
| Type | Article |
| Licence | |
| First Posted | 12 May 2001 |
| Views | 882,314 |
| Bookmarked | 190 times |
|
|