Re: Scale bitmaps using GDI+



DrawImage is not only for display. The Graphics object represents a drawing
surface. That surface can be an image, metafile, display, printer, etc.


"Eric" <Eric@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:257B08E6-F899-4A46-B470-FE134D432B4A@xxxxxxxxxxxxxxxx
THe purpose of the scaling is not for display. I need to save the scaled
image in file as JPEG. That means I must bind the scaled image to a
Bitmai/Image object to do that.

Thanks!
Eric


"Michael Phillips, Jr." wrote:

Use the Graphics's method DrawImage to scale your image.

"Eric" <Eric@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9443F4FA-B556-42C1-9EF4-24A8D421D73B@xxxxxxxxxxxxxxxx
In one of my applications, I need to perform image scaling, then save
the
scaled image to a JPEG file. I can load the original image into a
bitmap/Image object, but, cannot find a method in these two classes to
do
the
scaling. Since there is no need to display it, I did not use Graphics
class.
Any ideas?
--
Thanks!
Eric





.



Relevant Pages

  • Re: .NET Drawing Unit Measurements
    ... #1 CreateGraphics creates a new graphics object so your calls... ... #3 CreateGraphics should be used with great care and never for drawing. ... a paint event or OnPaint / OnPaintBackground override. ... > lineX2, lineY2)", will the result drawing be in units of Display or> Pixels? ...
    (microsoft.public.dotnet.framework.drawing)
  • How can I convert a graphics object to image?
    ... I loaded an icon into a graphics object. ... Now I want to display it. ... Private sub Test (ByVal ExeOrDLL As String, ByVal ResourceID As Int32) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Get Button Text location
    ... of hibernation, etc. you're likely to need to update the Graphics object. ... None of those things are common, nor do I see any reason any except the change in display settings would cause a difference between the measured metrics the actual output. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: gdi+ GetThumbnailImage Image quality setting
    ... I don't want to display it. ... INT ThumbWidth = 100; ... > Is there a way to setting the Thumbnail image quality before call ... draw the original Image to the Graphics object ...
    (microsoft.public.win32.programmer.gdi)
  • Programming: Menus and Display
    ... park a graphics object that looks like the menu at the bottom of the ... Highlight text that's displayed. ... Use the 12th line of the display via commands given in item, ... nothing happens - the bottom line remains ...
    (comp.sys.hp48)

Loading