|
I want to know how can I save logo(jpge) pic
on jpge pic.
by code...
I want big pic and logo down on the pic.
that will be together.
when I save on web the photo the 2 pic will be 1.
|
|
|
|
|
You can't do anything with the JPEG files directly, you have to load the images into Bitmap objects to work with them.
Use the Graphics.FromImage to create a Graphics object that you can use to draw on the image. Use the DrawImage method to draw the logo onto the image.
If you are uploading the image in a web page, you can load the image directly from the upload stream into a Bitmap object using the Image.FromStream method.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Can someone give code that I can uploading the image in a web page
an add to him logo on the side????
|
|
|
|
|
I explained most of the process. You are supposed to make an effort to put something together, so that there is something substantial to help you with, or at least write a question that is based on the information that I have already given you. If you just repeat the same question over and over, you will get the same replies over and over.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I try what you write...
how can I save the Graphics object into jpge???
<br />
<br />
Graphics g;<br />
g.DrawImage(System.Drawing.Image.FromFile(""), 0, 0, 10, 10);<br />
g.DrawImage(System.Drawing.Image.FromFile(""), 10, 10, 2, 2);<br />
|
|
|
|
|
The Graphics object itself never contains any drawing data, it's only used to draw on some other object, like the screen or an image.
Something like:
using (Image img1 = Image.FromFile("...")) {
using (Graphics g = Graphics.FromImage(img1)) {
using (img2 = Image.FromFile("...")) {
g.DrawImage(img2, 10, 10, 2, 2);
}
}
img1.Save("...", ...);
}
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
|
Hi and happy new year
I've written a web application program by C# in VStudio 2005 that makes a list of all Windows Services in ther server. I want to start and stop the services. So I've used ServiceController and the mothods Start() and Stop(). But a Win32Exception (Access id Denied) appeared.
for example:
<br />
ServiceController serviceController = new ServiceController("MSSQLServer");<br />
serviceController.Start();<br />
How can I do that? Can anyone help me?
Mehdi
modified on Tuesday, January 08, 2008 3:16:11 AM
|
|
|
|
|
Hi there
I am having a page with GridView in which i have a Edit button. When i click the Edit button i make Response.Redirect to another page. I make modifications there and press OK or Cancel button which redirects me back to the GridView Page.I see the Updates if i have made. and then when i again click Edit to the same record, it shows me the old data that was there before updation. The reason is because it doesnt go to the Page_load method and doesnt get the latest data from the DataBase. But yes if i click the Cancel or OK button it does go to the Page_load method.
So my problem is that when i click Edit button second time for the same record it doesnt go to the page_load method.I know not easy for you to catch the error without seeing my code. If needed please let me know i shall post the required code. Any suggestions or help would be greatly appreciated.
Cheers
Menon
|
|
|
|
|
Have you set a breakpoint and confirmed it's not fired ? It seems more likely that it's loading from the cache.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian
Thank you very much. I was really lost thinking what had gone wrong and that my Page_Load is not getting fired. Yes i forgot to mention i always use breakpoints to debug my code when i have problem.
And i had also came to the conclusion because i had breakpoints and it was not going to the Page_Load i knew it.
Well Your guess was correct it was loading from the Cache. And i got it. I had put the OutputCache in the Page and that was the reason it was loading from the Cache.
Again thank you very much i had spent almost 2 days to figure this out.
If you can tell me this. Is it wrong to use the OutputCache? I was using OutputCache because the page was bit heavy and i thought it would help the page to open if i use OutputCache.
Thank you.
Cheers
Menon
|
|
|
|
|
You need to look into the outputcache documentations. I always used to implement data caching using Cache.Insert and reading from it. In my scenario, this method gave more handle than outputcache. In this all the events fires correctly. Easy way would be creating a cache utility class which manages caching for all the pages.
|
|
|
|
|
Hi Navaneeth,
Thanks for the reply. I will definitely go through the Topic Caching more deeply wherein i can learn to use it more properly.
Thanks
Cheers
Menon
|
|
|
|
|
Hi ,
I need some help about Query String like articles, Examples or E-Books. to know how pass values between pages using for Example value of selected value of DropDownList or other Controls.
Regards
Mr.Wonderful
|
|
|
|
|
|
Your post is pretty vague. Try a google search and many examples are found
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
The concept is incredibly simple. You append values to a URL using the syntax ?key=value&key=value where the ? is the first value, and all other values use &. Then you read the values, which are always strings and use things like intTryParse to convert them as needed.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anyone know how to filter image nudity in a online photo application?
|
|
|
|
|
No idea. That is a pretty tall order for a forum query. Only way is probably by manual inspection of each photo in the application.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
learningman wrote: Does anyone know how to filter image nudity in a online photo application?
Yeah, I don't think there is a cheap solution for this problem. Manual inspection would be my best solution as well.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
I have a website which has several links.
But there are few links when clicked gives "runtime error" with no specific details
when I refresh the same error page its working..
what could be the problem ??
Sathy
modified on Saturday, January 05, 2008 11:59:59 AM
|
|
|
|
|
Interesting..
I played a lot nothing was working ...
Atlast I opened the cofig file in the server for the website and saved it once ..
the links were working perfectly..
Any one know how is that working ??
Sathy
|
|
|
|
|
Why don't you put a break point on the Page Load Event of one of those pages that are giving you error and step through the code to see what's causing it? Unless its a pure HTML page, in which case your message should not have been posted in the ASP.NET forum.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
DigiOz Multimedia wrote: Why don't you put a break point on the Page Load Event
It was not hitting ... The page was showing a 'runtime error' before even the init() event..
Sathy
|
|
|
|
|
Some common things you could check:
- Make sure your application is market to run as an application (not a simple folder).
- Check web.config file for any unusual keys or configuration setting.
- Check to make sure IIS is running the correct version of .NET, i.e. if your application is ASP.NET 2.0, make sure your IIS is not running 1.1 or 1.0.
- Make sure that the user under which your ASP.NET is running has read and execute permission to your application folder.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|