Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / April 2007

Tip: Looking for answers? Try searching our database.

Make a new graphics object have all the properties of the old graphics object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
active - 17 Apr 2007 17:56 GMT
I have an image and a graphics object created (FromImage) from that image.

I need to create a new image and create a new graphics object from the new
image.

I want the new graphics object have all the properties of the old graphics
object (like PageUnit and InterpolationMode...)

Can I do that without setting them all one at a time?

Thanks
Michael Phillips, Jr. - 17 Apr 2007 18:08 GMT
> I want the new graphics object have all the properties of the old graphics
> object (like PageUnit and InterpolationMode...)
>
> Can I do that without setting them all one at a time?

No.  You can create a bitmap object using the graphics context of an
existing device.  But it will only inherit the characteristics of that
device such as its resolution.

>I have an image and a graphics object created (FromImage) from that image.
>
[quoted text clipped - 7 lines]
>
> Thanks
active - 17 Apr 2007 20:43 GMT
How about creating an image with the properties of another image?
is the possible?

Thanks for the info

>> I want the new graphics object have all the properties of the old
>> graphics object (like PageUnit and InterpolationMode...)
[quoted text clipped - 16 lines]
>>
>> Thanks
Michael Phillips, Jr. - 18 Apr 2007 00:21 GMT
> How about creating an image with the properties of another image?
> is the possible?

Use the Clone method.

> How about creating an image with the properties of another image?
> is the possible?
[quoted text clipped - 22 lines]
>>>
>>> Thanks
active - 18 Apr 2007 01:36 GMT
I'm sorry I asked wrong

Identical except for the size

thanks

>> How about creating an image with the properties of another image?
>> is the possible?
[quoted text clipped - 27 lines]
>>>>
>>>> Thanks
Michael Phillips, Jr. - 18 Apr 2007 14:54 GMT
No.  The memory allocated internally for a bitmap is predicated on its
width, height and PixelFormat.  A slight change in just one property creates
a different bitmap.

> I'm sorry I asked wrong
>
[quoted text clipped - 33 lines]
>>>>>
>>>>> Thanks
active - 18 Apr 2007 17:29 GMT
Thanks for your help.

The basic problem is:
I have an image that is basically the canvas that the user draws on.
He may also be making changes to the Graphics object that is used to draw on
the canvas.
Then he wants to make the canvas bigger and continue drawing.
I know how to create the bigger Image and draw the old picture on it and
create a new Graphics object from the new Image.
However, I don't know how to make the new Image and Graphic object reflect
changes in properties he may have made to the original items.

Guess I'll just copy the some of them

Thanks again

> No.  The memory allocated internally for a bitmap is predicated on its
> width, height and PixelFormat.  A slight change in just one property
[quoted text clipped - 37 lines]
>>>>>>
>>>>>> Thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.