Click here to Skip to main content
15,913,219 members
Home / Discussions / C#
   

C#

 
GeneralAD, Exchange and Icons Pin
totig9-Jul-03 11:07
totig9-Jul-03 11:07 
GeneralRe: AD, Exchange and Icons Pin
David Stone9-Jul-03 17:59
sitebuilderDavid Stone9-Jul-03 17:59 
GeneralRe: AD, Exchange and Icons Pin
J. Dunlap9-Jul-03 18:17
J. Dunlap9-Jul-03 18:17 
GeneralRe: AD, Exchange and Icons Pin
totig9-Jul-03 21:48
totig9-Jul-03 21:48 
GeneralRe: AD, Exchange and Icons Pin
Heath Stewart10-Jul-03 3:02
protectorHeath Stewart10-Jul-03 3:02 
Generalcom+ question Pin
jpribele9-Jul-03 9:23
jpribele9-Jul-03 9:23 
GeneralAnother image problem Pin
Mazdak9-Jul-03 6:43
Mazdak9-Jul-03 6:43 
GeneralRe: Another image problem Pin
Kastro9-Jul-03 7:11
Kastro9-Jul-03 7:11 
The following will open an image, create a Graphics object to use for drawing to it, draw a string, and save it to another file.
Image image = Image.FromFile("source.jpg");
Graphics g = Graphics.FromImage(image);
g.DrawString("Hello World!", new Font("Tahoma", 24), Brushes.Magenta, 10.0f, 10.0f);
g.Dispose();
image.Save("target.jpg");

Note that this will only work for non-indexed image formats. For an indexed format you could just create a new non-indexed Image into which you first draw the loaded Image before writing other stuff on top. Of course when you save the file it won't be in the same format as the original.
Image image = Image.FromFile("source.gif");
Bitmap bmp = new Bitmap(image.Width, image.Height, PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(bmp);
g.DrawImage(image, 0.0f, 0.0f);
g.DrawString("Hello World!", new Font("Tahoma", 24), Brushes.Magenta, 10.0f, 10.0f);
g.Dispose();
bmp.Save("target.jpg");

GeneralRe: Another image problem Pin
Mazdak9-Jul-03 7:39
Mazdak9-Jul-03 7:39 
GeneralRe: Another image problem Pin
Mazdak9-Jul-03 8:10
Mazdak9-Jul-03 8:10 
GeneralRe: Another image problem Pin
Kastro9-Jul-03 9:09
Kastro9-Jul-03 9:09 
GeneralRe: Another image problem Pin
Mazdak9-Jul-03 11:29
Mazdak9-Jul-03 11:29 
GeneralRe: Another image problem Pin
Mazdak10-Jul-03 6:12
Mazdak10-Jul-03 6:12 
QuestionSystem.Configuration.ConfigXmlWhitespace? Pin
CBoland9-Jul-03 5:14
CBoland9-Jul-03 5:14 
GeneralMultiimage in one tiff file Pin
Mazdak9-Jul-03 4:27
Mazdak9-Jul-03 4:27 
GeneralMultiple-frame TIFF file Pin
Valeria Bogdevich9-Jul-03 4:48
Valeria Bogdevich9-Jul-03 4:48 
GeneralRe: Multiple-frame TIFF file Pin
Mazdak9-Jul-03 6:45
Mazdak9-Jul-03 6:45 
GeneralWrong characters on printing results Pin
jpeg9-Jul-03 4:15
jpeg9-Jul-03 4:15 
Generalsaving a datagrid Pin
Cristian_Dior8-Jul-03 20:57
Cristian_Dior8-Jul-03 20:57 
GeneralRe: saving a datagrid Pin
perlmunger9-Jul-03 7:21
perlmunger9-Jul-03 7:21 
GeneralRe: saving a datagrid Pin
Cristian_Dior13-Jul-03 20:37
Cristian_Dior13-Jul-03 20:37 
Generalint.ToString() format problem Pin
zecodela8-Jul-03 17:01
zecodela8-Jul-03 17:01 
GeneralRe: int.ToString() format problem Pin
Kastro8-Jul-03 17:51
Kastro8-Jul-03 17:51 
GeneralUserControl rotation Pin
meschian8-Jul-03 12:34
meschian8-Jul-03 12:34 
GeneralRe: UserControl rotation Pin
J. Dunlap8-Jul-03 12:37
J. Dunlap8-Jul-03 12:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.