Re: create a clone of an existing Bitmap without using the clone method.
- From: " **Developer**" <REMOVEdeveloper@xxxxxxxxxx>
- Date: Wed, 18 Jan 2006 11:42:34 -0500
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
>>
>>
>
>
.
- Follow-Ups:
- Re: create a clone of an existing Bitmap without using the clone method.
- From: Bob Powell [MVP]
- Re: create a clone of an existing Bitmap without using the clone method.
- References:
- create a clone of an existing Bitmap without using the clone method.
- From: **Developer**
- Re: create a clone of an existing Bitmap without using the clone method.
- From: Bob Powell [MVP]
- create a clone of an existing Bitmap without using the clone method.
- Prev by Date: Re: Component for the fastest creation of multipage tiffs
- Next by Date: Re: Does Image.FromFile alway produce a bitmap no mater the format of the file?
- Previous by thread: Re: create a clone of an existing Bitmap without using the clone method.
- Next by thread: Re: create a clone of an existing Bitmap without using the clone method.
- Index(es):
Relevant Pages
|