Thanks Dustin it works, do you mind just explaining a little your solution. How does it make the thin black line go away. Thanks.
Main Topics
Browse All TopicsHi,
I have a ImageCrop method which will resize and recrop the image to a specific size. However when the image has been resize and recrop, there is a thin black line on the top of the image. I think its something got to do in the ImageCrop method, which is cause this problem, Could anyone advice me on what should i do, so that the thin black line will not be there? Thanks.
I have attached a screenshot of the problem. So that you can have a better understanding.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: dusionPosted on 2009-01-25 at 20:49:32ID: 23464197
hmm, I believe this is a side effect of using the interpolation function, lets strat by changing the imagecrop function code here:
,
int destX = -1;
int destY = -1;
and here:
grPhoto.DrawImage(imgPhoto
new Rectangle(destX, destY, destWidth+1, destHeight+1),
new Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
GraphicsUnit.Pixel);
Hope this helps,
Dustin