Click here to Skip to main content
15,921,905 members
Home / Discussions / C#
   

C#

 
AnswerRe: Cannot delete file....used by another process.....help guyz! Pin
Henry Minute6-Apr-09 1:52
Henry Minute6-Apr-09 1:52 
QuestionAbout Thread............ Pin
Isaac Gordon5-Apr-09 21:50
Isaac Gordon5-Apr-09 21:50 
AnswerRe: About Thread............ Pin
N a v a n e e t h5-Apr-09 21:59
N a v a n e e t h5-Apr-09 21:59 
Questionhow to solve C# graphicsPath.widen outofmemoryException Pin
wgh168995-Apr-09 21:49
wgh168995-Apr-09 21:49 
AnswerRe: how to solve C# graphicsPath.widen outofmemoryException Pin
DaveyM695-Apr-09 23:08
professionalDaveyM695-Apr-09 23:08 
QuestionRe: how to solve C# graphicsPath.widen outofmemoryException Pin
wgh168996-Apr-09 4:01
wgh168996-Apr-09 4:01 
AnswerRe: how to solve C# graphicsPath.widen outofmemoryException Pin
DaveyM697-Apr-09 1:13
professionalDaveyM697-Apr-09 1:13 
GeneralRe: how to solve C# graphicsPath.widen outofmemoryException Pin
wgh168997-Apr-09 2:19
wgh168997-Apr-09 2:19 
QuestionStatic KeyWord Pin
Isaac Gordon5-Apr-09 21:48
Isaac Gordon5-Apr-09 21:48 
AnswerRe: Static KeyWord Pin
Megidolaon5-Apr-09 21:57
Megidolaon5-Apr-09 21:57 
AnswerRe: Static KeyWord Pin
N a v a n e e t h5-Apr-09 22:04
N a v a n e e t h5-Apr-09 22:04 
QuestionDataGridView updating datasource problem Pin
half-life5-Apr-09 21:24
half-life5-Apr-09 21:24 
AnswerRe: DataGridView updating datasource problem Pin
Greg Chelstowski5-Apr-09 22:07
Greg Chelstowski5-Apr-09 22:07 
GeneralRe: DataGridView updating datasource problem Pin
half-life5-Apr-09 22:25
half-life5-Apr-09 22:25 
GeneralRe: DataGridView updating datasource problem Pin
Henry Minute6-Apr-09 1:57
Henry Minute6-Apr-09 1:57 
GeneralRe: DataGridView updating datasource problem Pin
half-life6-Apr-09 2:03
half-life6-Apr-09 2:03 
GeneralRe: DataGridView updating datasource problem Pin
Henry Minute6-Apr-09 2:08
Henry Minute6-Apr-09 2:08 
QuestionSizing issue with rotate Graphic Pin
FrankeyJames5-Apr-09 20:22
FrankeyJames5-Apr-09 20:22 
Okay, I thought this should be for a new thread....


I have an existing image.


originalImage = new Bitmap(path.ToString());

Bitmap newImage = new Bitmap(originalImage.Width, originalImage.Height);
g = Graphics.FromImage(newImage);

Matrix matrix = new Matrix();
matrix.Rotate(10f);

g.TranslateTransform( ((float)originalImage.Width) / 2,  ((float)originalImage.Height) / 2);
g.RotateTransform(10f);
g.TranslateTransform(-((float)originalImage.Width) / 2, -((float)originalImage.Height) / 2);


g.DrawImage(originalImage, 0, 0);


This works just as I want it to in terms of rotating on an axis in the center of a picture instead of 0,0 (x,y)coords. However, say my original picture is (wXh) 473x640 and when resized 10f I know it's supposed to be 577x712 or so. The reason it's bigger is that when the picture is rotated, say, angle of 10, the top left corner is no longer within the original dimension of the image and therefore apear cut off. I do not want this. I want the image to resize as needed to fit the entire contents of a rotated image.

Any idears? Setting the g.DrawImage and setting the width height, even to the known values needed, just exands the image is the Graphics object, so it appears, already lopped off parts of my image to stay within the initial constraints. I don't know how to mkae the Graphic larger bigger without affecting the Bitmap it initially used....


If there are any good sources for .net graphics that'd be great. I can't find an examples in dr. google and my pro c# book doens't have any such examples.
AnswerRe: Sizing issue with rotate Graphic Pin
Christian Graus5-Apr-09 20:29
protectorChristian Graus5-Apr-09 20:29 
GeneralRe: Sizing issue with rotate Graphic Pin
FrankeyJames5-Apr-09 20:57
FrankeyJames5-Apr-09 20:57 
GeneralRe: Sizing issue with rotate Graphic Pin
Christian Graus5-Apr-09 21:07
protectorChristian Graus5-Apr-09 21:07 
GeneralRe: Sizing issue with rotate Graphic Pin
FrankeyJames5-Apr-09 21:19
FrankeyJames5-Apr-09 21:19 
GeneralRe: Sizing issue with rotate Graphic Pin
Luc Pattyn6-Apr-09 3:14
sitebuilderLuc Pattyn6-Apr-09 3:14 
QuestionHow to Execute C# / SQL statement in outlook Pin
dabuskol5-Apr-09 20:14
dabuskol5-Apr-09 20:14 
AnswerRe: How to Execute C# / SQL statement in outlook Pin
Christian Graus5-Apr-09 20:21
protectorChristian Graus5-Apr-09 20:21 

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.