Jump to content

Surface.FitSurface for making an image larger


evanolds

Recommended Posts

I have this code to resize a surface to a new surface:

Surface fitsurf = new Surface(sz.Width, sz.Height);

// "surf" is also a Surface

fitsurf.FitSurface(ResamplingAlgorithm.SuperSampling, surf);

It fails with an ArgumentException when surf is smaller than fitsurf, which looks as though it may be by-design. Is there an argument I can pass, or a different function I can call to work regardless of the dimensions of two surfaces?

There are no warranties whatsoever on my plug-ins. Use them at your own risk. You may redistribute them if you'd like, but I'd prefer you just link to the download on my site. Please do not modify and redistribute.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...