Re: create a clone of an existing Bitmap without using the clone method.



That's what I've been doing but it's necessary to include the width and
height twice in the call and since the image is also included there is much
redundancy


Thanks

"Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23Z52IzAHGHA.2300@xxxxxxxxxxxxxxxxxxxxxxx
> The final size of an image depends on the declared resolution. When you
> draw an image, ideally you should use the DrawImage method that enables
> you to specify the Pixel GraphicsUnit otherwise the image will be adjusted
> for differences in the screen DPI and image DPI.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Ramuseco Limited .NET consulting
> http://www.ramuseco.com
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tipstricks.htm
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/faqmain.htm
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
> " **Developer**" <REMOVEdeveloper@xxxxxxxxxx> wrote in message
> news:OcmqQF6GGHA.1760@xxxxxxxxxxxxxxxxxxxxxxx
>> DrawImage(Image, Point)
>>
>> Draws the specified Image object, using its original physical size, at
>> the specified location.
>>
>> I just want the image drawn on the bitmap with the new pixels simply a
>> copy of the old pixels.
>>
>> That is, pixel for pixel, the original and the drawn images should be the
>> same.
>>
>> Will the above do that (unsure about what physical size means)
>>
>>
>>
>> Actually I simply want to create a clone of an existing Bitmap (zz)
>> without using the clone method.
>>
>> Dim TmpBitmap = New Drawing.Bitmap(zz)
>>
>> Dim TmpBitmapGr As Graphics = Graphics.FromImage(TmpBitmap)
>>
>> TmpBitmapGr.DrawImage(zz, new point(0,0))
>>
>>
>>
>> Will this do that?
>>
>>
>>
>>
>>
>> Thanks
>>
>>
>
>


.



Relevant Pages

  • Re: create a clone of an existing Bitmap without using the clone method.
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... >> you to specify the Pixel GraphicsUnit otherwise the image will be ... >>> That is, pixel for pixel, the original and the drawn images should be ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: page is too wide even
    ... You have nested tables, so you need to specify each table as 100%, and then ... specify the width percentage for each cell individually. ... search for "width=" and change the pixel value to a %. ... I'm getting ready to sign off, Susan, but if you need additional help, feel ...
    (microsoft.public.frontpage.programming)
  • OpenGL Correctness tips
    ... To obtain exact two-dimensional rasterization, carefully specify both the ... reliably fills the lower-left pixel of the viewport, and glRasterPos2i(0, ... model matrix because this cancels my 0.375 translation. ...
    (comp.graphics.api.opengl)
  • Region.IsEmpty() without a Graphics object
    ... to specify a Graphics object, i.e. an override that specifies the pixel ... determining whether not the sum of width * height for all rectangles ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Drawing a line
    ... The place where you create new classes is where you specify the base class, ... How do I create a "subclass" of CStatic? ... if you want a "line" that is 256 pixels long where each pixel ...
    (microsoft.public.vc.mfc)