Re: create a clone of an existing Bitmap without using the clone method.
- From: "Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 19 Jan 2006 19:15:17 +0100
Remember that the method that has all the best parameters for this task also
requires that you provide source and destination rectangles and that some
element of resizing may be imposed by you if you wish.
--
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:O9Hnw4EHGHA.516@xxxxxxxxxxxxxxxxxxxxxxx
> 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
>>>
>>>
>>
>>
>
>
.
- 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]
- Re: create a clone of an existing Bitmap without using the clone method.
- From: **Developer**
- create a clone of an existing Bitmap without using the clone method.
- Prev by Date: Re: image quality problem
- Next by Date: Re: Image.Save() problem
- Previous by thread: Re: create a clone of an existing Bitmap without using the clone method.
- Next by thread: PrinterSettings: SetHdevmode/SetHdevnames
- Index(es):
Relevant Pages
|