views:

1215

answers:

2

Afternoon all,

As this is my first post, let me introduce myself, I am Kadrin. I'm a developer at a large corporation in the central United States and have been out of college for about 1 year.

Anyway, I've been reading up on my C# alot lately (my team is slowly moving over to C#) and am having troulbe understanding the differences between the Image class and the Bitmap class. Now I know Bitmap inherits the Image class but from what I understand both are very similar. Can anyone shed some light on this please?

+3  A: 

The Bitmap class is the generalization of the Image class. The Image class is an abstract class;

The Bitmap class contains 12 constructors that construct the Bitmap object from different parameters. It can construct the Bitmap from another bitmap, and the string address of the image.

see more here: http://www.codersource.net/csharp_image_Processing.aspx

Richard
I think you mean an implementation of the abstract image class.
kenny
+1  A: 

Image provides an abstract access to an arbitrary image , it defines a set of methods that can loggically be applied upon any implementation of Image. Its not bounded to any particular image format or implementation . Bitmap is a specific implementation to the image abstract class which encapsulate windows GDI bitmap object. Bitmap is just a specific implementation to the Image abstract class which relay on the GDI bitmap Object.

You could for example , Create your own implementation to the Image abstract , by inheriting from the Image class and implementing the abstract methods.

Anyway , this is just a simple basic use of OOP , it shouldn't be hard to catch.