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

C#

 
QuestionImage Crop Issue [modified] Pin
Programm3r8-Sep-09 23:14
Programm3r8-Sep-09 23:14 
QuestionRe: Image Crop Issue Pin
Programm3r8-Sep-09 23:55
Programm3r8-Sep-09 23:55 
AnswerRe: Image Crop Issue Pin
carlecomm21-Sep-09 21:49
carlecomm21-Sep-09 21:49 
AnswerRe: Image Crop Issue Pin
Rob Smiley8-Sep-09 23:56
Rob Smiley8-Sep-09 23:56 
GeneralRe: Image Crop Issue Pin
Programm3r9-Sep-09 0:14
Programm3r9-Sep-09 0:14 
GeneralRe: Image Crop Issue Pin
Rob Smiley9-Sep-09 0:36
Rob Smiley9-Sep-09 0:36 
QuestionRe: Image Crop Issue Pin
Programm3r9-Sep-09 1:35
Programm3r9-Sep-09 1:35 
AnswerRe: Image Crop Issue Pin
Luc Pattyn9-Sep-09 1:47
sitebuilderLuc Pattyn9-Sep-09 1:47 
to discover which part of the image you want, you have to apply to your cropping (i.e.mouse) coordinates the same transformation that are being applied to the entire image; so you have to mimick the stretching if you PictureBox is set to stretch mode.

That is one of the many problems a PictureBox causes. I almost never use that class, I rather use a simple Panel, and create a Paint handler for it; that way I choose the transformations I want (if any) and I can apply the same transformations to mouse operations. Also, I can then keep the aspect ratio, something a PictureBox isn't really capable of.

Conclusion:
- apply transformations to all coordinates you get (from mouse handlers)
- if possible, get rid of PictureBox

Smile | :)

Luc Pattyn

Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.


GeneralRe: Image Crop Issue Pin
Programm3r9-Sep-09 1:54
Programm3r9-Sep-09 1:54 
AnswerRe: Image Crop Issue Pin
Rob Smiley9-Sep-09 2:22
Rob Smiley9-Sep-09 2:22 
GeneralRe: Image Crop Issue Pin
Programm3r9-Sep-09 2:54
Programm3r9-Sep-09 2:54 
QuestionProblem Sending Message from SERVER to CLIENT Pin
muhammad_umair8-Sep-09 23:09
muhammad_umair8-Sep-09 23:09 
AnswerRe: Problem Sending Message from SERVER to CLIENT Pin
monstale8-Sep-09 23:45
monstale8-Sep-09 23:45 
GeneralRe: Problem Sending Message from SERVER to CLIENT Pin
muhammad_umair9-Sep-09 0:19
muhammad_umair9-Sep-09 0:19 
GeneralRe: Problem Sending Message from SERVER to CLIENT Pin
monstale9-Sep-09 0:52
monstale9-Sep-09 0:52 
GeneralRe: Problem Sending Message from SERVER to CLIENT Pin
muhammad_umair9-Sep-09 1:43
muhammad_umair9-Sep-09 1:43 
GeneralRe: Problem Sending Message from SERVER to CLIENT Pin
monstale9-Sep-09 2:30
monstale9-Sep-09 2:30 
GeneralRe: Problem Sending Message from SERVER to CLIENT Pin
muhammad_umair9-Sep-09 2:44
muhammad_umair9-Sep-09 2:44 
GeneralRe: Problem Sending Message from SERVER to CLIENT Pin
J4amieC9-Sep-09 2:54
J4amieC9-Sep-09 2:54 
QuestionMouseWheel Event Pin
Lyon Sun8-Sep-09 21:52
Lyon Sun8-Sep-09 21:52 
AnswerRe: MouseWheel Event Pin
OriginalGriff8-Sep-09 22:17
mveOriginalGriff8-Sep-09 22:17 
GeneralRe: MouseWheel Event Pin
Lyon Sun8-Sep-09 23:09
Lyon Sun8-Sep-09 23:09 
GeneralRe: MouseWheel Event Pin
Christian Graus8-Sep-09 23:12
protectorChristian Graus8-Sep-09 23:12 
GeneralRe: MouseWheel Event Pin
Lyon Sun8-Sep-09 23:29
Lyon Sun8-Sep-09 23:29 
GeneralRe: MouseWheel Event Pin
OriginalGriff8-Sep-09 23:43
mveOriginalGriff8-Sep-09 23:43 

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.