progdigy.com Forum Index progdigy.com

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Picture stretching problem

 
Post new topic   Reply to topic    progdigy.com Forum Index -> GDIPLUS
View previous topic :: View next topic  
Author Message
evgeniy
Newbie
Newbie


Joined: 24 Feb 2010
Posts: 2

PostPosted: Wed Feb 24, 2010 2:07 am    Post subject: Picture stretching problem Reply with quote

Hi!

Faced with a problem - with a stretching the picture means GDI+ the bottom and right sides not to reach the desired size. This effect is seen in the screenshot - the picture should close the red border frame, but instead formed gap. Besides the size of this gap depends on the stretching.

Here is an example of code that paints the picture:

Code:

var
  Ii : TGPImage;
  destRect : TGPRect;
  P : TGPPen;
begin
  Ii:=TGPImage.Create('D:\Photo\Чечня\Чёрная акула.JPG');   // pic size 640*480
  JpgGDI:=TGPGraphics.Create(_dc);

  // out coords and size
  destRect.X:=10;
  destRect.Y:=10;
  destRect.Width:=1200;
  destRect.Height:=500;

  // pen for border
  P:=TGPPen.Create(MakeColor(255,0,0),1);

  JpgGDI.DrawRectangle(P,destRect);   
  JpgGDI.DrawImage(Ii,destRect);
end


screenshot url: http://s003.radikal.ru/i204/1002/22/94a622e22557.jpg



How to get rid of this gap?
Back to top
View user's profile Send private message
evgeniy
Newbie
Newbie


Joined: 24 Feb 2010
Posts: 2

PostPosted: Mon Mar 01, 2010 7:28 am    Post subject: Reply with quote

I solved the problem. Now using the IJL. It quickly and without bugs.
Back to top
View user's profile Send private message
waynefulcher
Newbie
Newbie


Joined: 09 Jul 2010
Posts: 4

PostPosted: Fri Jul 09, 2010 9:11 pm    Post subject: Solution please Reply with quote

I am having a simular problem.
Would you mind posting your solution so I could see how you fixed it?
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    progdigy.com Forum Index -> GDIPLUS All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group